world/README.md

30 lines
941 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# world 模块
世界定义与管理(根模块,平台入口域)。
## 功能
- 世界表 `world` 的 CRUDlist/get/create/update/delete
- 世界列表查询接口(供下拉/菜单)
- 创建世界自动生成 code、写入 created_at
## 数据表
- `world`:世界表(见 `models/world.json`
- 主键 `id`str32
- 唯一索引 `idx_world_code`code
- 字典world_type、statusappcodes_kv
## 目录结构
- `world/`Python 包init.py + __init__.py
- `models/`:表定义 `world.json`
- `json/`CRUD 定义 `world.json`
- `wwwroot/`index.ui + api/*.dspy
- `init/data.json`:字典种子数据
- `scripts/load_path.py`RBAC 路径注册
## 集成方式
宿主应用在入口 `init()` 中调用 `load_world()` 挂载模块函数。
库名统一通过 `ServerEnv().get_module_dbname("world")` 获取,禁止硬编码。
## 开发顺序
1最先开发无业务依赖