order.go
1.2 KB
package transform
import (
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models"
)
func TransformToOrderDomainModelFromPgModels(orderModel *models.Order) (*domain.Order, error) {
return &domain.Order{
OrderId: orderModel.OrderId,
Buyer: orderModel.Buyer,
CompanyId: orderModel.CompanyId,
PartnerId: orderModel.PartnerId,
DeliveryCode: orderModel.DeliveryCode,
IsDisable: orderModel.IsDisable,
OrderNo: orderModel.OrderNo,
OrderDetail: orderModel.OrderDetail,
OrderDividend: orderModel.OrderDividend,
OrderDividendStatus: orderModel.OrderDividendStatus,
OrderGoods: orderModel.OrderGoods,
OrderSource: orderModel.OrderSource,
OrderType: orderModel.OrderType,
OrderStatus: orderModel.OrderStatus,
TotalPrice: orderModel.TotalPrice,
RegionInfo: orderModel.RegionInfo,
Remarks: orderModel.Remarks,
CreateAt: orderModel.CreateAt,
UpdateAt: orderModel.UpdateAt,
DeleteAt: orderModel.DeleteAt,
}, nil
}