product_material_transform.go
934 字节
package dto
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
)
func DtoProductMaterial(productMaterialModel *domain.ProductMaterial) *DtoMaterial {
return &DtoMaterial{
ProductMaterialId: productMaterialModel.ProductMaterialId,
ProductMaterialGroupId: productMaterialModel.ProductMaterialGroupId,
MaterialNumber: productMaterialModel.MaterialNumber,
MaterialName: productMaterialModel.MaterialName,
MaterialAttribute: productMaterialModel.MaterialAttribute.Attribute,
MaterialCategory: productMaterialModel.MaterialCategory.Category,
Specification: productMaterialModel.ProductMaterialExt.Specification,
Remark: productMaterialModel.ProductMaterialExt.Remark,
Unit: productMaterialModel.ProductMaterialExt.Unit,
ExpiredDay: productMaterialModel.ProductMaterialExt.ExpiredDay,
}
}