natsio/model/warehouse_response.go

175 lines
5.7 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 {
2022-10-24 03:43:29 +00:00
Warehouse string `json:"warehouse"`
DoesSupportSellyExpress bool `json:"doesSupportSellyExpress"`
Supplier WarehouseSupplier `json:"supplier"`
Order WarehouseOrder `json:"order"`
Partner WarehousePartner `json:"partner"`
Delivery WarehouseDelivery `json:"delivery"`
Other WarehouseOther `json:"other"`
Food WarehouseFood `json:"food"`
AutoConfirmOrder WarehouseOrderConfirm `json:"autoConfirmOrder"`
2022-10-24 03:41:18 +00:00
}
2022-10-24 03:43:29 +00:00
// WarehouseOrderConfirm ...
type WarehouseOrderConfirm struct {
2022-10-24 03:41:18 +00:00
IsEnable bool `json:"isEnable"`
ConfirmDelayInSeconds int64 `json:"confirmDelayInSeconds"`
2022-09-13 04:47:46 +00:00
}
// WarehouseFood ...
type WarehouseFood struct {
ForceClosed bool `json:"forceClosed"`
IsClosed bool `json:"isClosed"`
TimeRange []TimeRange `json:"timeRange"`
}
// TimeRange ...
type TimeRange struct {
From int64 `json:"from"`
To int64 `json:"to"`
2022-08-31 11:06:00 +00:00
}
// 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 {
2022-10-17 04:09:27 +00:00
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
Status string `json:"status"`
DeliveryStatus string `json:"deliveryStatus"`
Data OrderORData `json:"data"`
2022-08-29 08:55:17 +00:00
}
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"`
2022-10-27 09:29:38 +00:00
Slug string `json:"slug"`
2022-08-30 04:03:02 +00:00
}
// ResponseLatLng ...
type ResponseLatLng struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}
// WarehouseNatsResponse ...
type WarehouseNatsResponse struct {
2022-12-12 07:07:28 +00:00
ID string `json:"_id"`
Staff string `json:"staff"`
BusinessType string `json:"businessType"`
Name string `json:"name"`
SearchString string `json:"searchString"`
Slug string `json:"slug"`
Status string `json:"status"`
Supplier string `json:"supplier"`
Contact ResponseWarehouseContact `json:"contact"`
Location ResponseWarehouseLocation `json:"location"`
Configurations WarehouseConfiguration `json:"configurations"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
ReasonPendingInactive string `json:"reasonPendingInactive"`
2022-08-30 04:03:02 +00:00
}
2022-09-30 03:32:33 +00:00
// WarehouseInfo ...
type WarehouseInfo struct {
ID string `json:"_id"`
Name string `json:"name"`
BusinessType string `json:"businessType"`
Status string `json:"status"`
Slug string `json:"slug"`
Supplier WarehouseSupplierInfo `json:"supplier"`
Location ResponseWarehouseLocation `json:"location"`
Contact ResponseWarehouseContact `json:"contact"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
// WarehouseSupplierInfo ...
type WarehouseSupplierInfo struct {
ID string `json:"_id"`
Name string `json:"name"`
}
// GetWarehousesResponse ...
type GetWarehousesResponse struct {
Total int64 `json:"total"`
Limit int64 `json:"limit"`
List []WarehouseInfo `json:"list"`
}