permission.go
557 字节
package transform
import (
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/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
}