企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
它的核心在于用户直接和权限挂钩 ![](https://img.kancloud.cn/91/9c/919c811b7bafa08b1f7cf4e9e6be7e81_482x343.png) 例子: ![](https://img.kancloud.cn/45/71/4571fb80d4f111087a7cfca6fbc7e62e_738x261.png) user | id | username |role| | --- | --- |--- | | 1 | stephen |1,2,5 | | 2 | weronica |1,2,3 | | 3 | andrew |1,4,5,6 | role | id | rulename | | --- | --- | | 1 | 查看 | | 2 | 编辑 | | 3 | 审核 | | 4 | 数据管理 | | 5 | 删除 | | 6 | 权限管理 | 他们是多对多关系 所以可以用中间表将他们关联在一起 user | id | username | | --- | --- |--- | | 1 | stephen | | 2 | weronica | | 3 | andrew | rule | id | rulename | | --- | --- | | 1 | 查看 | | 2 | 编辑 | | 3 | 审核 | | 4 | 数据管理 | | 5 | 删除 | | 6 | 权限管理 | user_rule | user_id | role_id | | --- | --- | | 1 | 1 | | 1 | 2 | | 1 | 5 | | 2 | 1 | | 2 | 2 | | 2 | 3 | | 3 | 1 | | 3 | 4 | | 3 | 5 | | 3 | 6 |