feat(ECR-026): OpsCMS ScheduledPublication 只读并 Closed
定时发布目录(ops_scheduled_publications),并加固 catalog 生成器。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Backend Design: ECR-026 ScheduledPublication
|
||||
|
||||
| ID | BD-2026-026 |
|
||||
| Status | Approved |
|
||||
| Coding | Loop authorized |
|
||||
| Level | L2 |
|
||||
| Migration | YES 000027 |
|
||||
|
||||
## Backend Change Boundary
|
||||
|
||||
```text
|
||||
Domain: ScheduledPublication (read)
|
||||
App: AdminHandler → admin.Service → AdminRepo
|
||||
API: GET /admin/cms/publications; GET /admin/cms/publications/{id}
|
||||
Permission: admin.cms.read
|
||||
Migration: 000027
|
||||
```
|
||||
|
||||
## Out of boundary
|
||||
|
||||
定时发布写操作 · UGC · 真支付 · Banner/FeedSlot 写
|
||||
|
||||
Rollback: down migration + remove routes/UI
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
## 2026-08-08
|
||||
|
||||
- **ECR-026 Closed**:OpsCMS ScheduledPublication(migration 000027 · admin-h5 client + /cms · 只读)
|
||||
- **ECR-025 Closed**:OpsCMS FeedSlot(migration 000026 · admin-h5 /cms · 只读)
|
||||
- **ECR-024 Closed**:OpsCMS Banner(`ops_banners` · admin-h5 `/cms` · migration 000025 · 只读)
|
||||
- **ECR-023 Closed**:AICoreConfig KnowledgeSource(`knowledge_sources` · admin-h5 `/ai` · migration 000024 · 只读)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# CODE_REVIEW — ECR-026
|
||||
|
||||
**Verdict:** Approve → Closed
|
||||
|
||||
Date: 2026-08-08 · Loop continuous
|
||||
|
||||
- ScheduledPublication 只读;无 UGC/真支付
|
||||
- Integration AC mapped · OpenAPI updated
|
||||
@@ -0,0 +1,22 @@
|
||||
ecr: ECR-026
|
||||
capability: OpsCMS
|
||||
bounded_context: Ops_CMS_NoUGC
|
||||
parent: WAVE0-FROZEN
|
||||
predecessor: ECR-025
|
||||
change:
|
||||
type: additive
|
||||
breaking_change: false
|
||||
migration_required: true
|
||||
compatibility_notes: >
|
||||
Adds ScheduledPublication read catalog. Forbidden: UGC / real payment.
|
||||
|
||||
apis:
|
||||
- method: GET
|
||||
path: /api/v1/admin/cms/publications
|
||||
change: added
|
||||
- method: GET
|
||||
path: /api/v1/admin/cms/publications/{id}
|
||||
change: added
|
||||
perms:
|
||||
- code: admin.cms.read
|
||||
change: unchanged
|
||||
@@ -0,0 +1,15 @@
|
||||
# ECR-026
|
||||
|
||||
**Title:** OpsCMS · ScheduledPublication(只读薄切片)
|
||||
**Status:** **Closed**
|
||||
**Closed:** 2026-08-08(Loop continuous)
|
||||
**Parent:** WAVE0-FROZEN · **Predecessor:** ECR-025 Closed
|
||||
**Change Level:** L2
|
||||
|
||||
## Change
|
||||
|
||||
ScheduledPublication 只读 · migration 000027 · admin-h5 client + /cms
|
||||
|
||||
## Linked
|
||||
|
||||
Spec `ops-scheduled-publication.md` · BD-2026-026 · CONTRACT_DIFF/ECR-026.yaml · TEST_REPORT/ECR-026.md
|
||||
@@ -0,0 +1,6 @@
|
||||
# ENGINEERING_SPEC — ECR-026
|
||||
|
||||
1. migration 000027
|
||||
2. AdminRepo/Service/Handler
|
||||
3. OpenAPI + admin-h5
|
||||
4. Integration · Closed
|
||||
@@ -0,0 +1,3 @@
|
||||
# HANDOFF — ECR-026 Architect → Engineer
|
||||
|
||||
Loop continuous · Approved + Coding. Migration 000027. Forbidden: UGC/真支付.
|
||||
@@ -0,0 +1,3 @@
|
||||
# HANDOFF — ECR-026 Engineer → Reviewer
|
||||
|
||||
TestOpsCMSPublications PASS · Ready for Closed.
|
||||
@@ -0,0 +1,3 @@
|
||||
# PRODUCT_SPEC — ECR-026
|
||||
|
||||
对齐 ops-scheduled-publication.md · Approved · Loop · L2 · ScheduledPublication 只读
|
||||
@@ -0,0 +1,6 @@
|
||||
# STATE — ECR-026
|
||||
|
||||
| Status | **Closed** |
|
||||
| Phase | closed |
|
||||
| Spec | ops-scheduled-publication.md |
|
||||
| Updated | 2026-08-08 |
|
||||
@@ -0,0 +1,12 @@
|
||||
id: TASK-026-ECR026
|
||||
ecr: ECR-026
|
||||
title: OpsCMS · ScheduledPublication(只读薄切片)
|
||||
role: engineer
|
||||
status: closed
|
||||
change_level: L2
|
||||
parent: WAVE0-FROZEN
|
||||
predecessor: ECR-025
|
||||
acceptance:
|
||||
- Spec AC mapped
|
||||
- ScheduledPublication read only
|
||||
- No UGC / payment
|
||||
@@ -0,0 +1,33 @@
|
||||
# TEST_REPORT — ECR-026 ScheduledPublication
|
||||
|
||||
Date: 2026-08-08 · Loop continuous · commit: `PENDING`
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/integration/ -run TestOpsCMSPublications -count=1
|
||||
npm run build:admin
|
||||
python3 scripts/ess-validate.py --phase review --ecr ECR-026
|
||||
python3 scripts/ess-gate-check.py --ecr ECR-026
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
| Check | Result |
|
||||
|-------|--------|
|
||||
| TestOpsCMSPublications | PASS |
|
||||
| build:admin | PASS |
|
||||
| ess-validate review | PASS |
|
||||
| ess-gate-check | PASS |
|
||||
|
||||
## AC
|
||||
|
||||
| ID | Evidence |
|
||||
|----|----------|
|
||||
| AC-F-01 | list seed/empty ok |
|
||||
| AC-F-02 | get 200 |
|
||||
| AC-F-03 | 未知 id → 404 |
|
||||
| AC-S-01 | 401 |
|
||||
| AC-S-02 | 403 |
|
||||
| AC-P-01 | list < 500ms |
|
||||
| AC-O-01 | N/A 只读 |
|
||||
@@ -30,3 +30,4 @@
|
||||
| ECR-023 | AICoreConfig · KnowledgeSource | **Closed** | Spec ops-knowledge-source · BD-2026-023 · migration 000024 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-024 | OpsCMS · Banner | **Closed** | Spec ops-banner · BD-2026-024 · migration 000025 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-025 | OpsCMS · FeedSlot | **Closed** | Spec ops-feed-slot.md · BD-2026-025 · migration 000026 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-026 | OpsCMS · ScheduledPublication | **Closed** | Spec ops-scheduled-publication.md · BD-2026-026 · migration 000027 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
|
||||
@@ -55,4 +55,4 @@ Human 明文:**直接用 Loop,不用人工确认。**
|
||||
|
||||
| Done | Next |
|
||||
|------|------|
|
||||
| ECR-013A…025 Closed | **ECR-026** ScheduledPublication(OpsCMS) |
|
||||
| ECR-013A…026 Closed | **ECR-027** KnowledgeChunk |
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"ecr": "026",
|
||||
"slug": "scheduled-publication",
|
||||
"concept": "ScheduledPublication",
|
||||
"list_method": "ScheduledPublications",
|
||||
"get_method": "ScheduledPublication",
|
||||
"table": "ops_scheduled_publications",
|
||||
"migration": "000027",
|
||||
"route_group": "/cms",
|
||||
"route_resource": "publications",
|
||||
"perm_const": "PermCMSRead",
|
||||
"perm_code": "admin.cms.read",
|
||||
"seed_code": "home_banner_week",
|
||||
"register_fn": "registerCMSPublications",
|
||||
"test_name": "TestOpsCMSPublications",
|
||||
"row_type": "ScheduledPublicationRow",
|
||||
"err_name": "ErrScheduledPublicationNotFound",
|
||||
"capability": "OpsCMS",
|
||||
"bc": "Ops_CMS_NoUGC",
|
||||
"predecessor": "ECR-025",
|
||||
"title": "OpsCMS · ScheduledPublication(只读薄切片)",
|
||||
"non_goals": "定时发布写操作 · UGC · 真支付 · Banner/FeedSlot 写",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "home_banner_week"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "首页横幅周排期占位"
|
||||
},
|
||||
{
|
||||
"name": "target_kind",
|
||||
"sql": "varchar(32) NOT NULL CHECK (target_kind IN ('banner','feed_slot'))",
|
||||
"go_name": "TargetKind",
|
||||
"go_type": "string",
|
||||
"json": "target_kind",
|
||||
"seed": "banner"
|
||||
},
|
||||
{
|
||||
"name": "target_code",
|
||||
"sql": "varchar(64) NOT NULL",
|
||||
"go_name": "TargetCode",
|
||||
"go_type": "string",
|
||||
"json": "target_code",
|
||||
"seed": "home_promo"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"ecr": "027",
|
||||
"slug": "knowledge-chunk",
|
||||
"concept": "KnowledgeChunk",
|
||||
"list_method": "KnowledgeChunks",
|
||||
"get_method": "KnowledgeChunk",
|
||||
"table": "knowledge_chunks",
|
||||
"migration": "000028",
|
||||
"route_group": "/ai",
|
||||
"route_resource": "knowledge-chunks",
|
||||
"perm_const": "PermAIConfigRead",
|
||||
"perm_code": "admin.ai_config.read",
|
||||
"seed_code": "ask_grounding_intro",
|
||||
"register_fn": "registerKnowledgeChunks",
|
||||
"test_name": "TestAICoreKnowledgeChunks",
|
||||
"row_type": "KnowledgeChunkRow",
|
||||
"err_name": "ErrKnowledgeChunkNotFound",
|
||||
"capability": "AICoreConfig",
|
||||
"bc": "Ask_Ops",
|
||||
"predecessor": "ECR-026",
|
||||
"title": "AICoreConfig · KnowledgeChunk(只读薄切片)",
|
||||
"non_goals": "Embedding · 上传切块 · 运行时 RAG 接线 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "ask_grounding_intro"
|
||||
},
|
||||
{
|
||||
"name": "source_code",
|
||||
"sql": "varchar(64) NOT NULL",
|
||||
"go_name": "SourceCode",
|
||||
"go_type": "string",
|
||||
"json": "source_code",
|
||||
"seed": "ask_grounding"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "问答 grounding 引言块"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"sql": "text NOT NULL",
|
||||
"go_name": "Body",
|
||||
"go_type": "string",
|
||||
"json": "body",
|
||||
"seed": "愈心谷提供陪伴式成长对话,非医疗诊断。"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ecr": "028",
|
||||
"slug": "tool-definition",
|
||||
"concept": "ToolDefinition",
|
||||
"list_method": "ToolDefinitions",
|
||||
"get_method": "ToolDefinition",
|
||||
"table": "tool_definitions",
|
||||
"migration": "000029",
|
||||
"route_group": "/ai",
|
||||
"route_resource": "tools",
|
||||
"perm_const": "PermAIConfigRead",
|
||||
"perm_code": "admin.ai_config.read",
|
||||
"seed_code": "fetch_profile_summary",
|
||||
"register_fn": "registerToolDefinitions",
|
||||
"test_name": "TestAICoreToolDefinitions",
|
||||
"row_type": "ToolDefinitionRow",
|
||||
"err_name": "ErrToolDefinitionNotFound",
|
||||
"capability": "AICoreConfig",
|
||||
"bc": "Ask_Ops",
|
||||
"predecessor": "ECR-027",
|
||||
"title": "AICoreConfig · ToolDefinition(只读薄切片)",
|
||||
"non_goals": "工具在线编辑 · 运行时绑定 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "fetch_profile_summary"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "拉取档案摘要"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"sql": "text NULL",
|
||||
"go_name": "Description",
|
||||
"go_type": "*string",
|
||||
"json": "description,omitempty",
|
||||
"seed": "只读工具定义占位"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ecr": "029",
|
||||
"slug": "block-policy",
|
||||
"concept": "BlockPolicy",
|
||||
"list_method": "BlockPolicies",
|
||||
"get_method": "BlockPolicy",
|
||||
"table": "block_policies",
|
||||
"migration": "000030",
|
||||
"route_group": "/content-safety",
|
||||
"route_resource": "block-policies",
|
||||
"perm_const": "PermContentSafetyRead",
|
||||
"perm_code": "admin.content_safety.read",
|
||||
"seed_code": "block_spam_link",
|
||||
"register_fn": "registerBlockPolicies",
|
||||
"test_name": "TestContentSafetyBlockPolicies",
|
||||
"row_type": "BlockPolicyRow",
|
||||
"err_name": "ErrBlockPolicyNotFound",
|
||||
"capability": "ContentSafety",
|
||||
"bc": "Content_Safety",
|
||||
"predecessor": "ECR-028",
|
||||
"title": "ContentSafety · BlockPolicy(只读薄切片)",
|
||||
"non_goals": "策略写发布 · 用户侧硬拦截上线 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "block_spam_link"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "外链垃圾拦截策略"
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"sql": "varchar(32) NOT NULL CHECK (action IN ('block','mask','review'))",
|
||||
"go_name": "Action",
|
||||
"go_type": "string",
|
||||
"json": "action",
|
||||
"seed": "block"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ecr": "030",
|
||||
"slug": "moderation-case",
|
||||
"concept": "ModerationCase",
|
||||
"list_method": "ModerationCases",
|
||||
"get_method": "ModerationCase",
|
||||
"table": "moderation_cases",
|
||||
"migration": "000031",
|
||||
"route_group": "/content-safety",
|
||||
"route_resource": "cases",
|
||||
"perm_const": "PermContentSafetyRead",
|
||||
"perm_code": "admin.content_safety.read",
|
||||
"seed_code": "demo_case_seed",
|
||||
"register_fn": "registerModerationCases",
|
||||
"test_name": "TestContentSafetyModerationCases",
|
||||
"row_type": "ModerationCaseRow",
|
||||
"err_name": "ErrModerationCaseNotFound",
|
||||
"capability": "ContentSafety",
|
||||
"bc": "Content_Safety",
|
||||
"predecessor": "ECR-029",
|
||||
"title": "ContentSafety · ModerationCase(只读薄切片)",
|
||||
"non_goals": "审核写回 · 真 NLP 厂商 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "demo_case_seed"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "示例审核案"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"sql": "varchar(32) NOT NULL CHECK (status IN ('open','closed'))",
|
||||
"go_name": "Status",
|
||||
"go_type": "string",
|
||||
"json": "status",
|
||||
"seed": "closed"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ecr": "031",
|
||||
"slug": "crisis-event",
|
||||
"concept": "CrisisEvent",
|
||||
"list_method": "CrisisEvents",
|
||||
"get_method": "CrisisEvent",
|
||||
"table": "crisis_events",
|
||||
"migration": "000032",
|
||||
"route_group": "/crisis",
|
||||
"route_resource": "events",
|
||||
"perm_const": "PermCrisisRead",
|
||||
"perm_code": "admin.crisis.read",
|
||||
"seed_code": "demo_crisis_event",
|
||||
"register_fn": "registerCrisisEvents",
|
||||
"test_name": "TestCrisisCareEvents",
|
||||
"row_type": "CrisisEventRow",
|
||||
"err_name": "ErrCrisisEventNotFound",
|
||||
"capability": "CrisisCare",
|
||||
"bc": "Content_Safety",
|
||||
"predecessor": "ECR-030",
|
||||
"title": "CrisisCare · CrisisEvent(只读薄切片)",
|
||||
"non_goals": "事件写入工单流 · 医疗诊断 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "demo_crisis_event"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "示例危机事件占位"
|
||||
},
|
||||
{
|
||||
"name": "severity",
|
||||
"sql": "varchar(16) NOT NULL CHECK (severity IN ('high','critical'))",
|
||||
"go_name": "Severity",
|
||||
"go_type": "string",
|
||||
"json": "severity",
|
||||
"seed": "high"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ecr": "032",
|
||||
"slug": "intervention-outcome",
|
||||
"concept": "InterventionOutcome",
|
||||
"list_method": "InterventionOutcomes",
|
||||
"get_method": "InterventionOutcome",
|
||||
"table": "intervention_outcomes",
|
||||
"migration": "000033",
|
||||
"route_group": "/crisis",
|
||||
"route_resource": "interventions",
|
||||
"perm_const": "PermCrisisRead",
|
||||
"perm_code": "admin.crisis.read",
|
||||
"seed_code": "demo_helpline_shown",
|
||||
"register_fn": "registerInterventionOutcomes",
|
||||
"test_name": "TestCrisisCareInterventions",
|
||||
"row_type": "InterventionOutcomeRow",
|
||||
"err_name": "ErrInterventionOutcomeNotFound",
|
||||
"capability": "CrisisCare",
|
||||
"bc": "Content_Safety",
|
||||
"predecessor": "ECR-031",
|
||||
"title": "CrisisCare · InterventionOutcome(只读薄切片)",
|
||||
"non_goals": "干预写回 · 医疗诊断 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "demo_helpline_shown"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "示例展示热线结果"
|
||||
},
|
||||
{
|
||||
"name": "outcome",
|
||||
"sql": "varchar(32) NOT NULL CHECK (outcome IN ('helpline_shown','escalated','blocked'))",
|
||||
"go_name": "Outcome",
|
||||
"go_type": "string",
|
||||
"json": "outcome",
|
||||
"seed": "helpline_shown"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ecr": "033",
|
||||
"slug": "handoff-case",
|
||||
"concept": "HandoffCase",
|
||||
"list_method": "HandoffCases",
|
||||
"get_method": "HandoffCase",
|
||||
"table": "ask_handoff_cases",
|
||||
"migration": "000034",
|
||||
"route_group": "/ask",
|
||||
"route_resource": "handoffs",
|
||||
"perm_const": "PermAskRead",
|
||||
"perm_code": "admin.ask.read",
|
||||
"seed_code": "demo_handoff",
|
||||
"register_fn": "registerHandoffCases",
|
||||
"test_name": "TestAskOpsHandoffs",
|
||||
"row_type": "HandoffCaseRow",
|
||||
"err_name": "ErrHandoffCaseNotFound",
|
||||
"capability": "AskOperations",
|
||||
"bc": "Ask_Ops",
|
||||
"predecessor": "ECR-032",
|
||||
"title": "AskOperations · HandoffCase(只读薄切片)",
|
||||
"non_goals": "转人工写流 · 顾问执业 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "demo_handoff"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "示例转接案"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"sql": "varchar(32) NOT NULL CHECK (status IN ('open','closed'))",
|
||||
"go_name": "Status",
|
||||
"go_type": "string",
|
||||
"json": "status",
|
||||
"seed": "closed"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"ecr": "034",
|
||||
"slug": "privacy-request",
|
||||
"concept": "PrivacyRequest",
|
||||
"list_method": "PrivacyRequests",
|
||||
"get_method": "PrivacyRequest",
|
||||
"table": "privacy_requests",
|
||||
"migration": "000035",
|
||||
"route_group": "/privacy",
|
||||
"route_resource": "requests",
|
||||
"perm_const": "PermPrivacyRead",
|
||||
"perm_code": "admin.privacy.read",
|
||||
"new_perm": true,
|
||||
"seed_code": "demo_export_req",
|
||||
"register_fn": "registerPrivacyRequests",
|
||||
"test_name": "TestAdminPrivacyRequests",
|
||||
"row_type": "PrivacyRequestRow",
|
||||
"err_name": "ErrPrivacyRequestNotFound",
|
||||
"capability": "AdminGovernance",
|
||||
"bc": "Admin_Auth_Audit",
|
||||
"predecessor": "ECR-033",
|
||||
"title": "AdminGovernance · PrivacyRequest(只读薄切片)",
|
||||
"non_goals": "隐私请求履约写 · soft-delete · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "demo_export_req"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "示例数据导出请求"
|
||||
},
|
||||
{
|
||||
"name": "kind",
|
||||
"sql": "varchar(32) NOT NULL CHECK (kind IN ('export','erase'))",
|
||||
"go_name": "Kind",
|
||||
"go_type": "string",
|
||||
"json": "kind",
|
||||
"seed": "export"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"sql": "varchar(32) NOT NULL CHECK (status IN ('open','closed'))",
|
||||
"go_name": "Status",
|
||||
"go_type": "string",
|
||||
"json": "status",
|
||||
"seed": "closed"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"ecr": "035",
|
||||
"slug": "star-config",
|
||||
"concept": "StarConfig",
|
||||
"list_method": "StarConfigs",
|
||||
"get_method": "StarConfig",
|
||||
"table": "star_configs",
|
||||
"migration": "000036",
|
||||
"route_group": "/explore",
|
||||
"route_resource": "star-configs",
|
||||
"perm_const": "PermExploreRead",
|
||||
"perm_code": "admin.explore.read",
|
||||
"new_perm": true,
|
||||
"seed_code": "default_star",
|
||||
"register_fn": "registerStarConfigs",
|
||||
"test_name": "TestExploreStarConfigs",
|
||||
"row_type": "StarConfigRow",
|
||||
"err_name": "ErrStarConfigNotFound",
|
||||
"capability": "ExploreConfig",
|
||||
"bc": "Explore_Reports",
|
||||
"predecessor": "ECR-034",
|
||||
"title": "ExploreConfig · StarConfig(只读薄切片)",
|
||||
"non_goals": "配置写发布 · 引擎改分层 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "default_star"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "默认星座配置"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"ecr": "036",
|
||||
"slug": "rhythm-config",
|
||||
"concept": "RhythmConfig",
|
||||
"list_method": "RhythmConfigs",
|
||||
"get_method": "RhythmConfig",
|
||||
"table": "rhythm_configs",
|
||||
"migration": "000037",
|
||||
"route_group": "/explore",
|
||||
"route_resource": "rhythm-configs",
|
||||
"perm_const": "PermExploreRead",
|
||||
"perm_code": "admin.explore.read",
|
||||
"new_perm": false,
|
||||
"seed_code": "default_rhythm",
|
||||
"register_fn": "registerRhythmConfigs",
|
||||
"test_name": "TestExploreRhythmConfigs",
|
||||
"row_type": "RhythmConfigRow",
|
||||
"err_name": "ErrRhythmConfigNotFound",
|
||||
"capability": "ExploreConfig",
|
||||
"bc": "Explore_Reports",
|
||||
"predecessor": "ECR-035",
|
||||
"title": "ExploreConfig · RhythmConfig(只读薄切片)",
|
||||
"non_goals": "配置写发布 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "default_rhythm"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "默认节律配置"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"ecr": "037",
|
||||
"slug": "image-card-deck",
|
||||
"concept": "ImageCardDeck",
|
||||
"list_method": "ImageCardDecks",
|
||||
"get_method": "ImageCardDeck",
|
||||
"table": "image_card_decks",
|
||||
"migration": "000038",
|
||||
"route_group": "/explore",
|
||||
"route_resource": "image-card-decks",
|
||||
"perm_const": "PermExploreRead",
|
||||
"perm_code": "admin.explore.read",
|
||||
"new_perm": false,
|
||||
"seed_code": "default_deck",
|
||||
"register_fn": "registerImageCardDecks",
|
||||
"test_name": "TestExploreImageCardDecks",
|
||||
"row_type": "ImageCardDeckRow",
|
||||
"err_name": "ErrImageCardDeckNotFound",
|
||||
"capability": "ExploreConfig",
|
||||
"bc": "Explore_Reports",
|
||||
"predecessor": "ECR-036",
|
||||
"title": "ExploreConfig · ImageCardDeck(只读薄切片)",
|
||||
"non_goals": "牌组写发布 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "default_deck"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "默认意象牌组"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"ecr": "038",
|
||||
"slug": "report-template",
|
||||
"concept": "ReportTemplate",
|
||||
"list_method": "ReportTemplates",
|
||||
"get_method": "ReportTemplate",
|
||||
"table": "report_templates",
|
||||
"migration": "000039",
|
||||
"route_group": "/growth",
|
||||
"route_resource": "report-templates",
|
||||
"perm_const": "PermGrowthRead",
|
||||
"perm_code": "admin.growth.read",
|
||||
"new_perm": true,
|
||||
"seed_code": "portrait_default",
|
||||
"register_fn": "registerReportTemplates",
|
||||
"test_name": "TestGrowthReportTemplates",
|
||||
"row_type": "ReportTemplateRow",
|
||||
"err_name": "ErrReportTemplateNotFound",
|
||||
"capability": "GrowthInsights",
|
||||
"bc": "Explore_Reports",
|
||||
"predecessor": "ECR-037",
|
||||
"title": "GrowthInsights · ReportTemplate(只读薄切片)",
|
||||
"non_goals": "模板写发布 · 广告投放 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "portrait_default"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "画像报告模板占位"
|
||||
},
|
||||
{
|
||||
"name": "scene",
|
||||
"sql": "varchar(32) NOT NULL",
|
||||
"go_name": "Scene",
|
||||
"go_type": "string",
|
||||
"json": "scene",
|
||||
"seed": "portrait"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"ecr": "039",
|
||||
"slug": "funnel-definition",
|
||||
"concept": "FunnelDefinition",
|
||||
"list_method": "FunnelDefinitions",
|
||||
"get_method": "FunnelDefinition",
|
||||
"table": "funnel_definitions",
|
||||
"migration": "000040",
|
||||
"route_group": "/analytics",
|
||||
"route_resource": "funnel-definitions",
|
||||
"perm_const": "PermAnalyticsRead",
|
||||
"perm_code": "admin.analytics.read",
|
||||
"new_perm": false,
|
||||
"seed_code": "signup_to_ask",
|
||||
"register_fn": "registerFunnelDefinitions",
|
||||
"test_name": "TestGrowthFunnelDefinitions",
|
||||
"row_type": "FunnelDefinitionRow",
|
||||
"err_name": "ErrFunnelDefinitionNotFound",
|
||||
"capability": "GrowthInsights",
|
||||
"bc": "Analytics_OpsB",
|
||||
"predecessor": "ECR-038",
|
||||
"title": "GrowthInsights · FunnelDefinition(只读薄切片)",
|
||||
"non_goals": "漏斗写配置 · UGC · 真支付",
|
||||
"columns": [
|
||||
{
|
||||
"name": "code",
|
||||
"sql": "varchar(64) NOT NULL UNIQUE",
|
||||
"go_name": "Code",
|
||||
"go_type": "string",
|
||||
"json": "code",
|
||||
"seed": "signup_to_ask"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"sql": "varchar(128) NOT NULL",
|
||||
"go_name": "Title",
|
||||
"go_type": "string",
|
||||
"json": "title",
|
||||
"seed": "注册到问答漏斗占位"
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"sql": "boolean NOT NULL DEFAULT true",
|
||||
"go_name": "Active",
|
||||
"go_type": "bool",
|
||||
"json": "active",
|
||||
"seed": true
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"sql": "boolean NOT NULL DEFAULT false",
|
||||
"go_name": "System",
|
||||
"go_type": "bool",
|
||||
"json": "system",
|
||||
"seed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user