good.go
808 字节
package transform
import (
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models"
)
func TransformToGoodDomainModelFromPgModels(goodModel *models.Good) (*domain.Good, error) {
return &domain.Good{
GoodId: goodModel.GoodId,
GoodNum: goodModel.GoodNum,
GoodDividend: goodModel.GoodDividend,
GoodDividendStatus: goodModel.GoodDividendStatus,
GoodName: goodModel.GoodName,
GoodTotalPrice: goodModel.GoodTotalPrice,
Remarks: goodModel.Remarks,
OrderNo: goodModel.OrderNo,
GoodDetail: goodModel.GoodDetail,
CreateAt: goodModel.CreateAt,
UpdateAt: goodModel.UpdateAt,
DeleteAt: goodModel.DeleteAt,
}, nil
}