作者 yangfu

add service menu

version: v1
kind: HttpApi
metadata:
service: menu
path: /menus
endpoints:
- method: createMenu
route:
post: /
- method: updateMenu
route:
put: /{Id}
- method: getMenu
route:
get: /{Id}
- method: removeMenu
route:
delete: /{Id}
- method: listMenu
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: Attribute
metadata:
name: menuId
description: 菜单编号
type:
primitive: int64
... ...
... ... @@ -3,5 +3,5 @@ kind: Attribute
metadata:
name: organizationId
description: 组织ID
type:
primitive: string
type:
primitive: int64
... ...
... ... @@ -16,14 +16,6 @@ metadata:
description: 权限名称
type:
primitive: string
- name: object
description: 对象 eg:users
type:
primitive: string
- name: action
description: 操作行为 eg:delete 操作列表(add/delete/edit/list/view/import/export)
type:
primitive: string
- name: accessCode
description: 权限编码 eg:users:delete
type:
... ...
version: v1
kind: Schema
metadata:
name: companyCustomer (停用)
description: 客户信息 (base)
name: companyCustomer
description: 客户信息 (base) (停用)
attributes:
- ref: companyCustomerId
required: true
... ...
version: v1
kind: Schema
metadata:
name: companyProduct (停用)
description: 产品信息 (base)
name: companyProduct
description: 产品信息 (base) (停用)
attributes:
- ref: companyProductId
required: true
... ...
version: v1
kind: Schema
metadata:
name: companyRegion (停用)
description: 公司区域 (base)
name: companyRegion
description: 公司区域 (base) (停用)
attributes:
- ref: companyRegionId
required: true
... ...
version: v1
kind: Schema
metadata:
name: credentialAuth (base) (停用)
description: 凭证认证
name: credentialAuth
description: 凭证认证 (base) (停用)
attributes:
- name: credential
description: 凭证
... ...
version: v1
kind: Schema
metadata:
name: customizeMenus (base)
description: 自定义菜单(菜单维护)
name: customizeMenus
description: 自定义菜单 (base)(菜单维护)
attributes:
- name: customizeMenusId
description: 自定义菜单id
... ...
... ... @@ -4,10 +4,8 @@ metadata:
name: menu
description: 系统菜单
attributes:
- name: menuId
description: 菜单编号
type:
primitive: int64
- ref: menuId
required: true
- name: parentId
description: 父级id
type:
... ... @@ -17,7 +15,11 @@ metadata:
type:
primitive: string
- name: code
description: 菜单编码 SYSTEM_USER_EDIT (权限编码)
description: 菜单编码 SYSTEM_USER_EDIT / 100101 (字符编码)
type:
primitive: string
- name: accessCode
description: 权限编码 users:edit
type:
primitive: string
- name: menuType
... ...
version: v1
kind: Schema
metadata:
name: organization (base)
description: 组织
name: organization
description: 组织 (base)
attributes:
- ref: organizationId
required: true
... ...
version: v1
kind: Schema
metadata:
name: phoneAuth (base)
description: 手机认证
name: phoneAuth
description: 手机认证 (base)
attributes:
- name: phone
description: 手机号
... ...
version: v1
kind: Method
metadata:
name: createMenu
type: command
description: 创建菜单服务
payload:
- name: parentId
description: 父级id
type:
primitive: int64
- name: menuName
description: 菜单名称
type:
primitive: string
required: true
- name: code
description: 菜单编码 SYSTEM_USER_EDIT / 100101 (字符编码)
type:
primitive: string
required: true
- name: accessCode
description: 权限编码 users:edit
type:
primitive: string
required: true
- name: menuType
description: 菜单类型 (目录catalog、菜单menu、按钮button)
type:
primitive: string
required: true
- name: icon
description: 菜单图标
type:
primitive: string
- name: sort
description: 排序
type:
primitive: int
required: true
- name: desc
description: 菜单说明
type:
primitive: string
- name: isPublish
description: 菜单是否公开状态,[0:隐藏],[1:显示],默认显示
type:
primitive: int
required: true
result:
- name: menu
type:
schema: menu
required: true
... ...
version: v1
kind: Method
metadata:
name: getMenu
type: query
description: 返回菜单服务
payload:
- ref: menuId
required: true
result:
- name: menu
type:
schema: menu
required: true
... ...
version: v1
kind: Method
metadata:
name: listMenu
type: query
description: 返回菜单服务列表
payload:
- name: menuCategory
description: 菜单类别 web app
required: fasle
type:
primitive: string
- name: menuParentId
description: 菜单父级id 0:查询所有 n:父级id为n的菜单列表
required: fasle
type:
primitive: string
- name: menuName
description: 菜单名称过滤
required: fasle
type:
primitive: string
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: menus
type:
array: menu
required: true
... ...
version: v1
kind: Method
metadata:
name: removeMenu
type: command
description: 移除菜单服务
payload:
- ref: menuId
required: true
result:
- name: menu
type:
schema: menu
required: true
... ...
version: v1
kind: Method
metadata:
name: updateMenu
type: command
description: 更新菜单服务
payload:
- ref: menuId
required: true
- name: menuName
description: 菜单名称
type:
primitive: string
required: true
- name: code
description: 菜单编码 SYSTEM_USER_EDIT / 100101 (字符编码)
type:
primitive: string
required: true
- name: accessCode
description: 权限编码 users:edit
type:
primitive: string
- name: menuType
description: 菜单类型 (目录catalog、菜单menu、按钮button)
type:
primitive: string
required: true
- name: icon
description: 菜单图标
type:
primitive: string
- name: sort
description: 排序
type:
primitive: int
required: true
- name: desc
description: 菜单说明
type:
primitive: string
- name: isPublish
description: 菜单是否公开状态,[0:隐藏],[1:显示],默认显示
type:
primitive: int
result:
- name: menu
type:
schema: menu
required: true
... ...
version: v1
kind: Service
metadata:
name: menu
description: 菜单服务
... ...