org.go
706 字节
package transform
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/infrastructure/pg/models"
)
func TransformToOrgDomainModelFromPgModels(orgModel *models.Org) (*domain.Org, error) {
return &domain.Org{
OrgId: orgModel.OrgId,
CompanyId: orgModel.CompanyId,
CreatedAt: orgModel.CreatedAt,
UpdatedAt: orgModel.UpdatedAt,
DeletedAt: orgModel.DeletedAt,
OrgCode: orgModel.OrgCode,
OrgName: orgModel.OrgName,
Ext: orgModel.Ext,
IsOrg: orgModel.IsOrg,
OrgStatus: orgModel.OrgStatus,
ParentId: orgModel.ParentId,
ParentPath: orgModel.ParentPath,
}, nil
}