feat(ECR-006): 落地运营后台 Phase A(admin API + admin-h5)
ci / h5 (push) Canceled after 0s
ci / api (push) Canceled after 0s
ci / ess-docs (push) Canceled after 0s

新增独立鉴权的 /api/v1/admin 与 Vue 控制台;会员授予与审计同事务,并补集成/单测。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-06 18:35:53 +08:00
co-authored by Cursor
parent 4a583c9480
commit 879bf70cb7
59 changed files with 2462 additions and 20 deletions
+32
View File
@@ -172,6 +172,36 @@
| payload | jsonb | |
| created_at | timestamptz | |
### admin_accountsOps-A · ECR-006
| column | type | notes |
|---|---|---|
| id | uuid PK | |
| username | text unique | |
| password_hash | text | bcrypt |
| status | text | active/disabled |
| created_at | timestamptz | |
| updated_at | timestamptz | |
### admin_sessions
| column | type | notes |
|---|---|---|
| id | uuid PK | |
| admin_id | uuid FK→admin_accounts | |
| token | text unique | opaque |
| expires_at | timestamptz | |
| created_at | timestamptz | |
### admin_audit_logs
| column | type | notes |
|---|---|---|
| id | uuid PK | |
| admin_id | uuid FK | |
| action | text | e.g. membership.grant |
| target_type | text | user/order/… |
| target_id | text | |
| meta | jsonb | |
| created_at | timestamptz | 只追加 |
---
## Relationship sketch
@@ -185,4 +215,6 @@ users 1──* orders 1──* payments
growth_reports 1──* deep_accesses
profiles ── relation_insights ── profiles
users 1──* ask_threads 1──* ask_messages
admin_accounts 1──* admin_sessions
admin_accounts 1──* admin_audit_logs
```