menu.go
710 字节
package transform
import (
"gitlab.fjmaimaimai.com/mmm-go-pp/terms/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go-pp/terms/pkg/infrastructure/pg/models"
)
func TransformToMenuDomainModelFromPgModels(menuModel *models.Menu) (*domain.Menu, error) {
return &domain.Menu{
MenuId: menuModel.MenuId,
ParentId: menuModel.ParentId,
MenuName: 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,
IsSystem: menuModel.IsSystem,
}, nil
}