完善活动运营域与联调标准化
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
# 数据模型
|
||||
> 文档版本:v1.0
|
||||
> 最后更新:2026-04-02 08:28:05
|
||||
> 文档版本:v1.3
|
||||
> 最后更新:2026-04-03 12:36:15
|
||||
|
||||
|
||||
当前 migration 共 6 版。
|
||||
当前 migration 共 10 版。
|
||||
|
||||
## 1. 迁移清单
|
||||
|
||||
@@ -13,6 +12,10 @@
|
||||
- [0004_results.sql](D:/dev/cmr-mini/backend/migrations/0004_results.sql)
|
||||
- [0005_config_pipeline.sql](D:/dev/cmr-mini/backend/migrations/0005_config_pipeline.sql)
|
||||
- [0006_resource_objects.sql](D:/dev/cmr-mini/backend/migrations/0006_resource_objects.sql)
|
||||
- [0007_variant_minimal.sql](D:/dev/cmr-mini/backend/migrations/0007_variant_minimal.sql)
|
||||
- [0008_production_skeleton.sql](D:/dev/cmr-mini/backend/migrations/0008_production_skeleton.sql)
|
||||
- [0009_event_ops_phase2.sql](D:/dev/cmr-mini/backend/migrations/0009_event_ops_phase2.sql)
|
||||
- [0010_event_default_bindings.sql](D:/dev/cmr-mini/backend/migrations/0010_event_default_bindings.sql)
|
||||
|
||||
## 2. 表分组
|
||||
|
||||
@@ -114,6 +117,51 @@
|
||||
- 支撑后台第一版按“资源对象 + 版本”管理
|
||||
- 给后续 event 引用组装和发布流程提供稳定边界
|
||||
|
||||
### 2.8 第一阶段生产骨架
|
||||
|
||||
- `places`
|
||||
- `map_assets`
|
||||
- `tile_releases`
|
||||
- `course_sources`
|
||||
- `course_sets`
|
||||
- `course_variants`
|
||||
- `map_runtime_bindings`
|
||||
|
||||
职责:
|
||||
|
||||
- 把地图运行域和活动运行绑定正式落库
|
||||
- 把 KML 输入源和最终赛道方案拆开
|
||||
- 在不推翻当前 `events / event_releases / game_sessions` 主链的前提下,增量补生产骨架
|
||||
|
||||
### 2.9 活动运营域第二阶段
|
||||
|
||||
- `event_presentations`
|
||||
- `content_bundles`
|
||||
|
||||
职责:
|
||||
|
||||
- 把活动展示定义和内容包从临时 JSON 概念收成正式对象
|
||||
- 让 `event_releases` 明确绑定:
|
||||
- `presentation_id`
|
||||
- `content_bundle_id`
|
||||
- `runtime_binding_id`
|
||||
- 保持现有 `resolvedRelease / business / variant / runtime` 稳定返回不变
|
||||
|
||||
### 2.10 Event 默认 active 绑定
|
||||
|
||||
- `events.current_presentation_id`
|
||||
- `events.current_content_bundle_id`
|
||||
- `events.current_runtime_binding_id`
|
||||
|
||||
职责:
|
||||
|
||||
- 固化 event 当前默认 active:
|
||||
- `presentation`
|
||||
- `content bundle`
|
||||
- `runtime binding`
|
||||
- 支撑 publish 在未显式传入时的默认继承
|
||||
- 不改变前端当前稳定消费的 release / launch 字段语义
|
||||
|
||||
## 3. 当前最关键的关系
|
||||
|
||||
### `tenant -> entry_channel`
|
||||
@@ -160,6 +208,42 @@
|
||||
|
||||
一套内容/音频/主题资源可有多个版本。
|
||||
|
||||
### `place -> map_asset -> tile_release`
|
||||
|
||||
- `Place` 是地点上层对象
|
||||
- `MapAsset` 是地点下的一张具体地图资产
|
||||
- `TileRelease` 是某张地图的具体瓦片发布版本
|
||||
|
||||
### `course_source -> course_variant -> course_set`
|
||||
|
||||
- `CourseSource` 是原始输入源,例如 KML
|
||||
- `CourseVariant` 是最终可运行赛道方案
|
||||
- `CourseSet` 是一组方案集合
|
||||
|
||||
### `event_release -> map_runtime_binding`
|
||||
|
||||
- `event_releases.runtime_binding_id` 已预留给第一阶段生产骨架
|
||||
- 当前客户端联调仍以 `resolvedRelease` 为主
|
||||
- 第二阶段会继续把 `placeId / mapId / tileReleaseId / courseVariantId` 收到 `launch` 稳定返回中
|
||||
|
||||
### `event -> event_presentation`
|
||||
|
||||
- 一个 `event` 可有多条展示定义
|
||||
- 当前最小用途是给 `event_release` 提供明确绑定目标
|
||||
|
||||
### `event -> content_bundle`
|
||||
|
||||
- 一个 `event` 可有多条内容包
|
||||
- 当前最小用途是给 `event_release` 提供内容资源绑定目标
|
||||
|
||||
### `event_release -> presentation / content_bundle / runtime`
|
||||
|
||||
- 这是当前活动运营域第二阶段的最小闭环
|
||||
- `release` 现在可以稳定固化:
|
||||
- 展示定义
|
||||
- 内容包
|
||||
- 运行绑定
|
||||
|
||||
## 4. 当前已落库但仍应注意的边界
|
||||
|
||||
### 4.1 不要把玩法细节塞回事件主表
|
||||
|
||||
Reference in New Issue
Block a user