permission.go
573 字节
package transform
import (
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01-gateway/pkg/infrastructure/pg/models"
)
func TransformToPermissionDomainModelFromPgModels(permissionModel *models.Permission) (*domain.Permission, error) {
return &domain.Permission{
PermissionId: permissionModel.PermissionId,
Name: permissionModel.Name,
Code: permissionModel.Code,
ParentId: permissionModel.ParentId,
Sort: permissionModel.Sort,
Icon: permissionModel.Icon,
}, nil
}