Files
group_xinghuo_jinrong/docs/项目框架设计/Core模拟底座/01-表结构与种子说明.md
T
zhanghongyu_0626 1ddd44a6cb Add core database support and enhance documentation
- Introduced `MYSQL_CORE_DATABASE` in `.env.example` and `settings.py` for core database configuration.
- Added `CoreReadOnlyRepository` for read-only access to the `jinrong_core` database.
- Updated `AGENTS.md`, `README.md`, and various documentation files to reflect new agent onboarding processes and project structure.
- Revised requirements in `requirements.txt` to include `langgraph` and `langchain-core`.
- Enhanced `FLOW.md` with local bootstrap instructions for setting up the core simulation environment.
- Added new scripts for database creation and seeding for the core simulation library.
- Improved overall documentation for clarity on project architecture and memory management.
- Updated `TODO.md` to reflect current development priorities and tasks.
2026-09-05 17:39:16 +08:00

1.8 KiB
Raw Blame History

Core 模拟底座 · 表结构与种子说明

状态:已落地 · 库名 jinrong_core
方案:00-方案总览.md


1. 已确认决策

项 决定
库名 jinrong_core
访问方式 CoreReadOnlyRepository 只读 SQL,无 HTTP API
种子规模 28 客户、13 员工(含 RBAC 多角色)、12 产品
Neo4j P0 必做 · scripts/sync/sync_neo4j.py
行情 静态 core_product_nav seed

2. 表清单

见 scripts/core/01-ddl.sql

表 说明
core_risk_grade C1C5 / R1R5 字典
core_staff 内部员工 + roles JSON(RBAC 种子)
core_customer 客户主档
core_customer_risk L0 正式测评
core_customer_advisor 归属 → sync 到 agent 库
core_product 产品 + 最低风险等级
core_holding 持仓快照
core_trade / core_cash_flow 流水
core_product_nav 净值 C-05
core_industry 行业(Neo4j BELONGS_TO)

3. 脚本与代码

路径 作用
scripts/core/00~06-*.sql 建库 + 种子
scripts/core/reset.ps1 一键重置
scripts/sync/sync_advisor_rel.py → customer_advisor_rel
scripts/sync/sync_neo4j.py → Neo4j 图
app/repository/core_ro.py 只读 Repository
scripts/dev/rbac-seed-reference.md RBAC 验收对照

4. 环境变量

MYSQL_CORE_DATABASE=jinrong_core
NEO4J_URI=bolt://localhost:7687
NEO4J_PASSWORD=...

5. 关联文档