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 {
|
2024-07-03 08:36:56 +00:00
|
|
|
MinimumValue float64 `json:"minimumValue"`
|
|
|
|
PaymentMethod WarehousePaymentMethod `json:"paymentMethod"`
|
|
|
|
IsLimitNumberOfPurchases bool `json:"isLimitNumberOfPurchases"`
|
|
|
|
LimitNumberOfPurchases int64 `json:"limitNumberOfPurchases"`
|
|
|
|
NotifyOnNewOrder WarehouseConfigNotifyOnNewOrder `json:"notifyOnNewOrder"`
|
|
|
|
LabelSize string `json:"labelSize"`
|
|
|
|
MaximumOrderValue float64 `json:"maximumOrderValue"`
|
|
|
|
MaximumNumberPerBuyerEachMonth float64 `json:"maximumNumberPerBuyerEachMonth"`
|
2023-04-05 09:00:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// WarehouseConfigNotifyOnNewOrder ...
|
|
|
|
type WarehouseConfigNotifyOnNewOrder struct {
|
|
|
|
Enable bool `bson:"enable" json:"enable"`
|
|
|
|
Channel string `bson:"channel" json:"channel"`
|
|
|
|
RoomID string `bson:"roomId" json:"roomId"`
|
2022-08-18 10:47:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// WarehousePaymentMethod ...
|
|
|
|
type WarehousePaymentMethod struct {
|
|
|
|
Cod bool `json:"cod"`
|
|
|
|
BankTransfer bool `json:"bankTransfer"`
|
2023-05-10 07:00:08 +00:00
|
|
|
Fundiin bool `json:"fundiin"`
|
2022-08-18 10:47:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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-31 02:43:46 +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"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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-12-14 03:52:38 +00:00
|
|
|
IsPendingInactive bool `json:"isPendingInactive"`
|
2024-04-15 04:59:54 +00:00
|
|
|
IsFromInternational bool `json:"isFromInternational"`
|
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"`
|
|
|
|
}
|
2024-04-08 07:25:18 +00:00
|
|
|
|
|
|
|
type GetListWarehouseConfigRes struct {
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
Limit int64 `json:"limit"`
|
|
|
|
List []WarehouseConfiguration `json:"list"`
|
|
|
|
}
|