feat(cultivate-flower): 新增等待时长字段并更新阶段规则校验逻辑

This commit is contained in:
Austin
2026-10-08 12:47:17 +08:00
parent 5a7d8407bc
commit 55ae8b2acd
5 changed files with 34 additions and 14 deletions
@@ -292,6 +292,7 @@ Query 参数:
"required_points": 10,
"water_points": 2,
"fertilize_points": 3,
"wait_hours": 36,
"allowed_actions": ["water", "fertilize"],
"image_file_id": "file_xxx",
"animation_file_id": "file_xxx",
@@ -329,7 +330,7 @@ Query 参数:
- 状态枚举:`online`、`offline`、`activity_only`、`maintenance`。
- 阶段枚举:`seed`、`sprout`、`bud`、`bloom`。
- 阶段链必须从 `seed` 连续配置并以 `bloom` 结束,不能重复或成环。
- 非 `bloom` 阶段 `required_points > 0`,且至少允许一个动作。
- 非 `bloom` 阶段 `required_points` 与 `wait_hours` 不能同时为 0(2026-10-08 起:升级条件 = 积分就绪 AND 等待就绪,允许纯积分或纯等待阶段),且至少允许一个动作。
- 动作枚举:`water`、`fertilize`。
- 文件 ID 必须通过 IM 内部文件校验,风险或待审核素材不能保存。
- 花种和阶段规则必须在一个数据库事务内保存。