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 今天認領。 未關閉documentation
cameri/nostream#878 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
feat(admin): Restyle admin console to match nostream.dev and fix Grafana chart embeds可能已有人在做 @Ferryx349 今天認領。 未關閉Admin Console enhancement
cameri/nostream#874 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
factory rewrite
難度 5/5 一週以上 新手友好度 35/100
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 90/100
chrisparsons83/flexspotff#215 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
vitest-dev/vitest#11633 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆