feat(payments): subscription data model and plan settings
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Is your feature request related to a problem? Please describe.
Admission is a one-time boolean (users.is_admitted). There is nowhere to record a paid period, a plan, or when access ends, so recurring billing and tiered access (#673) cannot be built. This is the first, behaviour-neutral step.
Describe the solution you'd like
- A
user_subscriptionstable (pubkey, plan id, status, period start/end, grace end, cancel-at-period-end) and theinvoicescolumnsplan_id,period_start,period_end, via a migration. A subscription is keyed by pubkey, so no separate subscription id is needed. payments.subscriptionPlans[]in settings (id, price, interval, grace period, per-plan limits), with types, defaults (empty list), validation invalidateSettings, andCONFIGURATION.mddocs.IUserSubscriptionRepository(find by pubkey, upsert, list due for renewal/expiry) and the invoice repository/Invoicetype changes, with unit tests.- The migration grandfathers every existing
is_admitteduser onto a non-expiring plan so enabling plans later never locks anyone out. - No change to runtime behaviour: with no plans configured the relay behaves exactly as today.
Additional context
- Design: #673. Earlier groundwork for the same layer.
- 主要语言
- TypeScript
- 星标
- 829
- 派生
- 234
- 平均合并
- 22 小时 43 分钟
- 30 天内合并 PR
- 52
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cameri/nostream 的其他 Issue
-
Website
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 62/100
维护者通常 1 天内回复
-
Add the official Nostream Telegram channel and development chat to the website可能已有人在做 @chappie-daemon 于 1 天前认领。 未关闭documentation
cameri/nostream#878 · 已指派 1 人 ·
维护者通常 1 天内回复
-
feat(admin): Restyle admin console to match nostream.dev and fix Grafana chart embeds可能已有人在做 @Ferryx349 于 1 天前认领。 未关闭Admin Console enhancement
cameri/nostream#874 · 已指派 1 人 ·
维护者通常 1 天内回复
-
factory rewrite
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
freshness freshness:observed-only
难度 2/5 1-3 小时 新手友好度 68/100
thoroc/context-radar#280 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
-
documentation story
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
bug category:billing priority:p3 track:fast
难度 2/5 1-3 小时 新手友好度 72/100
LanternOps/breeze#9223 ·
维护者通常 1 天内回复