feat(ECR-006): 落地运营后台 Phase A(admin API + admin-h5)
新增独立鉴权的 /api/v1/admin 与 Vue 控制台;会员授予与审计同事务,并补集成/单测。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -172,6 +172,36 @@
|
||||
| payload | jsonb | |
|
||||
| created_at | timestamptz | |
|
||||
|
||||
### admin_accounts(Ops-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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user