role.go
699 字节
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 TransformToRoleDomainModelFromPgModels(roleModel *models.Role) (*domain.Role, error) {
return &domain.Role{
RoleId: roleModel.RoleId,
CompanyId: roleModel.CompanyId,
OrgId: roleModel.OrgId,
RoleType: roleModel.RoleType,
RoleName: roleModel.RoleName,
AccessMenus: roleModel.AccessMenus,
Desc: roleModel.Desc,
Ext: roleModel.Ext,
CreatedAt: roleModel.CreatedAt,
UpdatedAt: roleModel.UpdatedAt,
DeletedAt: roleModel.DeletedAt,
}, nil
}