From 51c5784c46e4778ba955db6364a2fb1ca5d86662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 2 Oct 2026 20:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3(=E8=AE=A1=E8=B4=B9):=20?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BC=9A=E5=91=98=E6=A1=A3=E4=BD=8D=20rank?= =?UTF-8?q?=20=E5=8F=AF=E5=A4=B1=E8=B4=A5=E8=BF=94=E5=9B=9E=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ADR §3 更新 runtime_profile_membership_plan_rank 签名为 Option 说明目录缺行时返回 None,不再用 unwrap_or(0) 伪装成 Normal Co-authored-by: Junie --- .../【技术设计】泥点三池与会员计费后端设计-2026-10-02.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/technical/【技术设计】泥点三池与会员计费后端设计-2026-10-02.md b/docs/technical/【技术设计】泥点三池与会员计费后端设计-2026-10-02.md index b23958b0e..38420eef9 100644 --- a/docs/technical/【技术设计】泥点三池与会员计费后端设计-2026-10-02.md +++ b/docs/technical/【技术设计】泥点三池与会员计费后端设计-2026-10-02.md @@ -254,8 +254,9 @@ pub struct RuntimeProfileMembershipUpgradeQuote { `model_access` / `concurrent_job_limit` / `sort_order` / `enabled`)。 - `resolve_runtime_profile_membership_plan_snapshot(plan, cycle_kind)`: 「档位 + 周期 → 可下单套餐」的唯一解析入口,`price_cents` 取所选周期的价格字段。 -- `runtime_profile_membership_plan_rank(plan)` / `is_runtime_profile_membership_plan_purchasable(plan)`: - 升级比较与可购买判定的唯一入口(`Normal` 与下架档位都不可购买)。 +- `runtime_profile_membership_plan_rank(plan) -> Option` / `is_runtime_profile_membership_plan_purchasable(plan) -> bool`: + 升级比较与可购买判定的唯一入口;`rank` 缺行时返回 `None`(不再用 `unwrap_or(0)` 把缺失伪装成 `Normal`), + `Normal` 与下架档位都不可购买。 `RuntimeProfileMembershipSnapshot` / `RuntimeProfileMembershipRecord`: `tier` → `plan`(枚举),删 `cycle_period_days`,新增 `cycle_index` / `cycle_count` / `cycle_kind`。