workshop.go
762 字节
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 TransformToWorkshopDomainModelFromPgModels(workshopModel *models.Workshop) (*domain.Workshop, error) {
return &domain.Workshop{
CompanyId: workshopModel.CompanyId,
OrgId: workshopModel.OrgId,
WorkshopId: workshopModel.WorkshopId,
WorkshopName: workshopModel.WorkshopName,
Principal: workshopModel.Principal,
ProductLines: workshopModel.ProductLines,
CreatedAt: workshopModel.CreatedAt,
UpdatedAt: workshopModel.UpdatedAt,
DeletedAt: workshopModel.DeletedAt,
Ext: workshopModel.Ext,
}, nil
}