57 lines
2.1 KiB
Go
57 lines
2.1 KiB
Go
package response
|
|
|
|
import (
|
|
"psi/models"
|
|
"time"
|
|
)
|
|
|
|
type LogisticsResponse struct {
|
|
Id uint64 `json:"id"`
|
|
TemplateName string `json:"templateName"`
|
|
DeliveryProvince string `json:"deliveryProvince"`
|
|
DeliveryCity string `json:"deliveryCity"`
|
|
DeliveryArea string `json:"deliveryArea"`
|
|
DeliveryAddress string `json:"deliveryAddress"`
|
|
PricingMethod string `json:"pricingMethod"`
|
|
Shipping string `json:"shipping"`
|
|
FirWbv float64 `json:"firWbv"`
|
|
FirPrice float64 `json:"firPrice"`
|
|
ContinueWbv float64 `json:"continueWbv"`
|
|
ContinuePrice float64 `json:"continuePrice"`
|
|
Contact string `json:"contact"`
|
|
PhoneNumber uint64 `json:"phoneNumber"`
|
|
FullAddress string `json:"fullAddress"`
|
|
ShippingRange string `json:"shippingRange"`
|
|
WarehouseId uint64 `json:"warehouseId"`
|
|
Remark string `json:"remark"`
|
|
Status string `json:"status"`
|
|
CreateTime *time.Time `json:"createTime"`
|
|
UpdateTime *time.Time `json:"updateTime"`
|
|
}
|
|
|
|
func ConvertLogisticsToResponse(logistics models.Logistics) LogisticsResponse {
|
|
return LogisticsResponse{
|
|
Id: logistics.Id,
|
|
TemplateName: logistics.TemplateName,
|
|
DeliveryProvince: logistics.DeliveryProvince,
|
|
DeliveryCity: logistics.DeliveryCity,
|
|
DeliveryArea: logistics.DeliveryArea,
|
|
DeliveryAddress: logistics.DeliveryAddress,
|
|
PricingMethod: logistics.PricingMethod,
|
|
Shipping: logistics.Shipping,
|
|
FirWbv: logistics.FirWbv,
|
|
FirPrice: logistics.FirPrice,
|
|
ContinueWbv: logistics.ContinueWbv,
|
|
ContinuePrice: logistics.ContinuePrice,
|
|
Contact: logistics.Contact,
|
|
PhoneNumber: logistics.PhoneNumber,
|
|
FullAddress: logistics.FullAddress,
|
|
ShippingRange: logistics.ShippingRange,
|
|
WarehouseId: logistics.WarehouseId,
|
|
Remark: logistics.Remark,
|
|
Status: logistics.Status,
|
|
CreateTime: logistics.CreateTime,
|
|
UpdateTime: logistics.UpdateTime,
|
|
}
|
|
}
|