menu.go
850 字节
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 TransformToMenuDomainModelFromPgModels(menuModel *models.Menu) (*domain.Menu, error) {
return &domain.Menu{
MenuId: menuModel.MenuId,
ParentId: menuModel.ParentId,
MenuName: menuModel.MenuName,
MenuAlias: menuModel.MenuName,
Code: menuModel.Code,
AccessCode: menuModel.AccessCode,
MenuType: menuModel.MenuType,
Icon: menuModel.Icon,
Sort: menuModel.Sort,
Remark: menuModel.Remark,
Category: menuModel.Category,
ParentPath: menuModel.ParentPath,
IsPublish: menuModel.IsPublish,
EnableStatus: menuModel.EnableStatus,
Link: menuModel.Link,
}, nil
}