opendb-admin-menus.schema.json 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {
  2. "bsonType": "object",
  3. "required": ["name", "menu_id"],
  4. "permission": {
  5. "read": true,
  6. "create": "'CREATE_OPENDB_ADMIN_MENUS' in auth.permission",
  7. "update": "'UPDATE_OPENDB_ADMIN_MENUS' in auth.permission",
  8. "delete": "'DELETE_OPENDB_ADMIN_MENUS' in auth.permission"
  9. },
  10. "properties": {
  11. "_id": {
  12. "description": "存储文档 ID,系统自动生成"
  13. },
  14. "menu_id": {
  15. "bsonType": "string",
  16. "description": "菜单项的ID,不可重复",
  17. "trim": "both"
  18. },
  19. "name": {
  20. "bsonType": "string",
  21. "description": "菜单名称",
  22. "trim": "both"
  23. },
  24. "icon": {
  25. "bsonType": "string",
  26. "description": "菜单图标",
  27. "trim": "both"
  28. },
  29. "url": {
  30. "bsonType": "string",
  31. "description": "菜单url",
  32. "trim": "both"
  33. },
  34. "sort": {
  35. "bsonType": "int",
  36. "description": "菜单序号(越大越靠后)"
  37. },
  38. "parent_id": {
  39. "bsonType": "string",
  40. "description": "父级菜单Id",
  41. "parentKey": "menu_id"
  42. },
  43. "permission": {
  44. "bsonType": "array",
  45. "description": "菜单权限列表"
  46. },
  47. "enable": {
  48. "bsonType": "bool",
  49. "description": "是否启用菜单,true启用、false禁用"
  50. },
  51. "create_date": {
  52. "bsonType": "timestamp",
  53. "description": "菜单创建时间",
  54. "forceDefaultValue": {
  55. "$env": "now"
  56. }
  57. }
  58. }
  59. }