natsio/model/warehouse_request.go

138 lines
4.4 KiB
Go
Raw Normal View History

2022-08-18 10:47:47 +00:00
package model
// OutboundRequestPayload ...
type OutboundRequestPayload struct {
2022-10-17 07:32:14 +00:00
OrderID string `json:"orderId"`
OrderCode string `json:"orderCode"`
TrackingCode string `json:"trackingCode"`
WarehouseID string `json:"warehouseId"`
SupplierID string `json:"supplierId"`
Note string `json:"note"`
CODAmount float64 `json:"codAmount"`
TPLCode string `json:"tplCode"`
Customer CustomerInfo `json:"customer"`
Items []OutboundRequestItem `json:"items"`
Insurance *InsuranceOpts `json:"insurance"`
PaymentMethod string `json:"paymentMethod"`
2022-08-26 03:28:49 +00:00
}
// InsuranceOpts ...
type InsuranceOpts struct {
InsuranceType string `json:"insuranceType"`
2022-08-26 03:28:49 +00:00
VehicleTypeID string `json:"vehicleTypeId"`
VehicleTypeName string `json:"vehicleTypeName"`
InsuranceTypeID string `json:"insuranceTypeId"`
YearsOfInsurance int `json:"yearsOfInsurance"`
License string `json:"license"`
Chassis string `json:"chassis"`
Engine string `json:"engine"`
BeginDate string `json:"beginDate"`
// For car insurance
NumberOfSeatsCarOccupantAccidentInsurance int `json:"numberOfSeatsCarOccupantAccidentInsurance"`
NumberOfSeats int `json:"numberOfSeats"`
NumberOfSeatsOrTonnageId string `json:"numberOfSeatsOrTonnageId"`
NumberOfSeatsOrTonnageName string `json:"numberOfSeatsOrTonnageName"`
2022-08-18 10:47:47 +00:00
}
// OutboundRequestItem ...
type OutboundRequestItem struct {
2022-09-19 04:10:23 +00:00
SupplierSKU string `json:"supplierSKU"`
Quantity int64 `json:"quantity"`
UnitCode string `json:"unitCode"`
Price float64 `json:"price"`
Name string `json:"name"`
2022-08-18 10:47:47 +00:00
}
// CustomerInfo ...
type CustomerInfo struct {
Name string `json:"name"`
PhoneNumber string `json:"phoneNumber"`
2022-08-26 03:28:49 +00:00
Email string `json:"email"`
2022-08-18 10:47:47 +00:00
Address AddressDetail `json:"address"`
}
// AddressDetail ...
type AddressDetail struct {
Address string `json:"address"`
FullAddress string `json:"fullAddress"`
ProvinceCode int `json:"provinceCode"`
DistrictCode int `json:"districtCode"`
WardCode int `json:"wardCode"`
}
// UpdateOutboundRequestLogisticInfoPayload ...
type UpdateOutboundRequestLogisticInfoPayload struct {
2023-11-29 07:10:08 +00:00
ShippingLabel string `json:"shippingLabel,omitempty"`
TrackingCode string `json:"trackingCode,omitempty"`
ORCode string `json:"orCode,omitempty"`
TPLCode string `json:"tplCode,omitempty"`
OrderID string `json:"orderId"`
DeliveryStatus string `json:"deliveryStatus,omitempty"`
2022-08-18 10:47:47 +00:00
}
// CancelOutboundRequest ...
type CancelOutboundRequest struct {
2022-10-05 02:19:54 +00:00
ORCode string `json:"orCode"`
OrderID string `json:"orderId"`
Note string `json:"note"`
2022-08-18 10:47:47 +00:00
}
2022-08-29 08:55:17 +00:00
// SyncORStatusRequest ...
type SyncORStatusRequest struct {
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
2022-10-05 02:19:54 +00:00
OrderID string `json:"orderId"`
2022-08-29 08:55:17 +00:00
}
// UpdateSupplierIsClosedRequest ...
type UpdateSupplierIsClosedRequest struct {
Suppliers []SupplierIsClosed `json:"suppliers"`
}
// SupplierIsClosed ...
type SupplierIsClosed struct {
Supplier string `json:"supplier"`
IsClosed bool `json:"isClosed"`
}
2022-09-30 03:32:33 +00:00
// GetWarehousesRequest ...
type GetWarehousesRequest struct {
2022-12-09 03:05:41 +00:00
Keyword string `json:"keyword"`
Status string `json:"status"`
Supplier string `json:"supplier"`
BusinessType string `json:"businessType"`
IDs []string `json:"ids"`
2022-09-30 03:32:33 +00:00
Page int64 `json:"page"`
Limit int64 `json:"limit"`
}
2022-10-18 07:57:14 +00:00
// WarehouseORUpdateDeliveryStatus ...
type WarehouseORUpdateDeliveryStatus struct {
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
OrderID string `json:"orderId"`
DeliveryStatus string `json:"deliveryStatus"`
}
// UpdateStatusWarehousePendingInactiveRequest ...
type UpdateStatusWarehousePendingInactiveRequest struct {
Warehouses []UpdateStatusWarehousePendingInactive `json:"warehouses"`
}
2023-09-22 08:50:06 +00:00
// UpdateIsSellyMallRequest ...
type UpdateIsSellyMallRequest struct {
SupplierID string `json:"supplier"`
}
// UpdateStatusWarehousePendingInactive ...
type UpdateStatusWarehousePendingInactive struct {
2023-01-17 07:23:24 +00:00
WarehouseID string `json:"warehouse"`
PendingInactive bool `json:"pendingInactive"`
}
type GetListWarehouseConfigReq struct {
ConfigPartnerCode string `json:"configPartnerCode"`
}