{
  "name": "角色",
  "table": {
    "name": "role",
    "comment": "角色表",
    "engine": "InnoDB"
  },
  "columns": [
    { "name": "id", "type": "ID" },
    {
      "label": "名称",
      "name": "name",
      "type": "string",
      "length": 200,
      "comment": "名称",
      "index": true
    },
    {
      "label": "标签",
      "name": "label",
      "type": "string",
      "length": 200,
      "comment": "标签",
      "index": true
    },
    {
      "label": "权限",
      "name": "permission",
      "type": "JSON",
      "comment": "权限"
    },
    {
      "label": "状态",
      "name": "status",
      "type": "enum",
      "default": "enabled",
      "option": ["enabled", "disabled"],
      "comment": "状态 enabled 开启, disabled 关闭",
      "index": true
    }
  ],
  "relations": {},
  "option": { "timestamps": true, "soft_deletes": true },
  "values": [
    {
      "label": "超级管理员",
      "name": "admin",
      "status": "enabled",
      "permission": { "read": ["t1", "t2", "t3"] }
    },
    {
      "label": "编辑",
      "name": "editor",
      "status": "enabled",
      "permission": { "read": ["t1", "t2", "t3"] }
    },
    {
      "label": "用户",
      "name": "user",
      "status": "enabled",
      "permission": { "read": ["t1", "t2", "t3"] }
    },
    {
      "label": "访客",
      "name": "any",
      "status": "disabled",
      "permission": { "read": ["t1", "t2", "t3"] }
    }
  ]
}
