fix(admin): standardize resource initialization and lists
This commit is contained in:
@@ -153,7 +153,7 @@ platforms/
|
||||
| 开放接口 | `api_` | `api_product`、`api_client`、`api_subscription` |
|
||||
| 平台任务 | `sys_` | `sys_outbox_event`、`sys_dead_letter_event` |
|
||||
|
||||
- 每张表必须包含数据库内部使用的 `id bigint` 自增主键;主表还必须包含由应用生成、带唯一索引的 UUID V7 `identity varchar(36)`。HTTP、消息、审计日志、Flutter/Vue 模型和跨服务引用只使用 `identity`,不得暴露或接受内部 `id`。
|
||||
- 每张表必须包含数据库内部使用的 `id bigint` 自增主键;主表还必须包含由应用生成、带唯一索引的 UUID V7 `identity varchar(36)`。写接口、消息、审计日志、Flutter 模型和跨服务引用只使用 `identity`,不得接受内部 `id`。三个受控管理后台的列表查询可以只读展示当前记录的主键 `id`,但详情、更新、删除、状态动作和关联选择仍必须使用 `identity`,不得把 `id` 作为写入条件或跨服务标识。
|
||||
- 数据库内部关联优先使用 `<实体词根>_id` 指向自增主键;跨服务契约、异步事件和审计关联使用 `<实体词根>_identity`。业务展示编号另设唯一字段,不能替代 `id` 或 `identity`。
|
||||
- 每个主表还应按需要包含 `created_at`、`updated_at`、`created_by_identity`、`updated_by_identity`、`status`、`version` 等审计/并发字段;资金流水、安全事件、审计日志等不可变记录不得被物理删除。
|
||||
- 数据库表、字段、索引、约束和枚举必须编写中文注释;注释说明业务含义、取值/单位、脱敏或留存要求。模型注释与接口契约必须同步维护,禁止只在设计文档中说明。
|
||||
|
||||
Reference in New Issue
Block a user