product_material.go
1.2 KB
package transform
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/pg/models"
)
func TransformToProductMaterialDomainModelFromPgModels(productMaterialModel *models.ProductMaterial) (*domain.ProductMaterial, error) {
return &domain.ProductMaterial{
ProductMaterialId: productMaterialModel.ProductMaterialId,
CompanyId: productMaterialModel.CompanyId,
OrgId: productMaterialModel.OrgId,
ProductMaterialGroupId: productMaterialModel.ProductMaterialGroupId,
MaterialNumber: productMaterialModel.MaterialNumber,
MaterialName: productMaterialModel.MaterialName,
MaterialAttribute: productMaterialModel.MaterialAttribute,
MaterialCategory: productMaterialModel.MaterialCategory,
ProductMaterialExt: productMaterialModel.ProductMaterialExt,
CreatedAt: productMaterialModel.CreatedAt,
UpdatedAt: productMaterialModel.UpdatedAt,
DeletedAt: productMaterialModel.DeletedAt,
Ext: productMaterialModel.Ext,
}, nil
}