natsio/model/warehouse_response.go

123 lines
3.9 KiB
Go
Raw Normal View History

2022-08-18 10:47:47 +00:00
package model
2022-08-30 04:03:02 +00:00
import "time"
2022-08-18 10:47:47 +00:00
// OutboundRequestResponse ...
type OutboundRequestResponse struct {
// System code
OrderCode string `json:"orderCode"`
TrackingCode string `json:"trackingCode"`
2022-08-22 04:02:37 +00:00
ID string `json:"id"` // OR id
2022-08-18 10:47:47 +00:00
// Partner response
ORCode string `json:"orCode"`
RequestID string `json:"requestId"`
Status string `json:"status"`
Reason string `json:"reason"`
}
// WarehouseConfiguration ...
type WarehouseConfiguration struct {
Warehouse string `json:"warehouse"`
DoesSupportSellyExpress bool `json:"doesSupportSellyExpress"`
Supplier WarehouseSupplier `json:"supplier"`
Order WarehouseOrder `json:"order"`
Partner WarehousePartner `json:"partner"`
Delivery WarehouseDelivery `json:"delivery"`
2022-08-31 11:06:00 +00:00
Other WarehouseOther `json:"other"`
}
// WarehouseOther ...
type WarehouseOther struct {
DoesSupportSellyExpress bool `json:"doesSupportSellyExpress"`
2022-08-18 10:47:47 +00:00
}
// WarehouseSupplier ...
type WarehouseSupplier struct {
CanAutoSendMail bool `json:"canAutoSendMail"`
InvoiceDeliveryMethod string `json:"invoiceDeliveryMethod"`
}
// WarehouseOrder ...
type WarehouseOrder struct {
MinimumValue float64 `json:"minimumValue"`
PaymentMethod WarehousePaymentMethod `json:"paymentMethod"`
2022-08-26 08:56:36 +00:00
IsLimitNumberOfPurchases bool `json:"isLimitNumberOfPurchases"`
LimitNumberOfPurchases int64 `json:"limitNumberOfPurchases"`
2022-08-18 10:47:47 +00:00
}
// WarehousePaymentMethod ...
type WarehousePaymentMethod struct {
Cod bool `json:"cod"`
BankTransfer bool `json:"bankTransfer"`
}
// WarehouseDelivery ...
type WarehouseDelivery struct {
DeliveryMethods []string `json:"deliveryMethods"`
2022-08-30 04:03:02 +00:00
PriorityServiceCodes []string `json:"priorityServiceCodes"`
EnabledSources []int `json:"enabledSources"`
Types []string `json:"types"`
2022-08-18 10:47:47 +00:00
}
// WarehousePartner ...
type WarehousePartner struct {
IdentityCode string `json:"identityCode"`
Code string `json:"code"`
Enabled bool `json:"enabled"`
Authentication string `json:"authentication"`
}
2022-08-29 08:55:17 +00:00
// SyncORStatusResponse ...
type SyncORStatusResponse struct {
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
Status string `json:"status"`
DeliveryStatus string `json:"deliveryStatus"`
}
2022-08-30 04:03:02 +00:00
// ResponseWarehouseContact ...
type ResponseWarehouseContact struct {
Name string `json:"name"`
Phone string `json:"phone"`
Address string `json:"address"`
Email string `json:"email"`
}
// ResponseWarehouseLocation ...
type ResponseWarehouseLocation struct {
Province CommonLocation `json:"province"`
District CommonLocation `json:"district"`
Ward CommonLocation `json:"ward"`
Address string `json:"address"`
LocationCoordinates ResponseLatLng `json:"locationCoordinates"`
}
type CommonLocation struct {
ID string `json:"id"`
Name string `json:"name"`
Code int `json:"code"`
}
// ResponseLatLng ...
type ResponseLatLng struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}
// WarehouseNatsResponse ...
type WarehouseNatsResponse struct {
ID string `json:"_id"`
2022-09-07 10:03:29 +00:00
Staff string `json:"staff"`
2022-08-30 04:03:02 +00:00
Name string `json:"name"`
SearchString string `json:"searchString"`
Slug string `json:"slug"`
Status string `json:"status"`
2022-08-30 07:03:49 +00:00
Supplier string `json:"supplier"`
2022-08-30 04:03:02 +00:00
Contact ResponseWarehouseContact `json:"contact"`
Location ResponseWarehouseLocation `json:"location"`
Configurations WarehouseConfiguration `json:"configurations"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}