goods.go 844 字节
package transform

import (
	"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain"
	"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models"
)

func TransformToGoodsDomainModelFromPgModels(goodsModel *models.Goods) (*domain.Goods, error) {
	return &domain.Goods{
		GoodsId:             goodsModel.GoodsId,
		GoodsNum:            goodsModel.GoodsNum,
		GoodsDividend:       goodsModel.GoodsDividend,
		GoodsDividendStatus: goodsModel.GoodsDividendStatus,
		GoodsName:           goodsModel.GoodsName,
		GoodsTotalPrice:     goodsModel.GoodsTotalPrice,
		Remarks:             goodsModel.Remarks,
		OrderNo:             goodsModel.OrderNo,
		GoodsDetail:         goodsModel.GoodsDetail,
		CreateAt:            goodsModel.CreateAt,
		UpdateAt:            goodsModel.UpdateAt,
		DeleteAt:            goodsModel.DeleteAt,
	}, nil
}