1
0

fix: docs

This commit is contained in:
2023-11-20 17:22:01 +08:00
parent 378415ea72
commit 62b5603a61
6 changed files with 63 additions and 14 deletions

View File

@@ -1,18 +1,7 @@
## EMS Database
## EMS Database
---
### 1. Diagram of OMC database
### 1. Relationship of menu, account, account_menu, title_info
![1679033737734](image/database/1679033737734.png)
通过多表联合查询可一次性获取某个账号的目录结果:
example, acouunt name='manager', lang-key='cn'
```sql
SELECT m.id, json_unquote(json_extract(t.title_json, '$.en')) as title, m.parent_id, m.sort_id FROM title_info t, menu m WHERE m.id IN (SELECT am.menu_id FROM account_menu am WHERE am.account_id = (SELECT id FROM account WHERE name='manager')) AND m.title_id = t.id ORDER BY m.id
```
![1700190137798](image/07-5GCOMCDatabaseDiagrams/1700190137798.png)