Hub 2.0 step 5: the church's address

Own domain R0, Cross Code address R10, domain included R25 (custom price
for other endings), once per invoice and never discounted; renewal date
with a reminder 30 days before, once per renewal, and Renewed to move it on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 16:24:10 +02:00
co-authored by Claude Opus 5.5
parent fff1c6f4ef
commit fbbf72dcd8
9 changed files with 229 additions and 11 deletions
+18
View File
@@ -50,6 +50,18 @@ model Customer {
// The next annual tier review: the first invoice for a period starting on or after it uses
// what each product reports (Events: 12-month event income; App: active members).
reviewDate DateTime? @db.Date
// Hub 2.0: the church's address, one for all its products (ROADMAP-v3 §10), billed once per
// invoice and never discounted. own_domain R0 · crosscode (<church>.crosscode.co.za) R10 ·
// included (a domain registered in the church's name and renewed by Cross Code) R25.
addressType AddressType @default(own_domain)
// The domain: hopefamily.co.za, or hopefamily.crosscode.co.za for a Cross Code address.
domain String?
// A price per month instead of the option's (e.g. a .com charged at cost), in cents.
addressCustomCents Int?
// Domain included: when it's next due for renewal, and the renewal date Joshua was last
// reminded about (30 days before), so he's reminded once per renewal.
domainRenewsOn DateTime? @db.Date
domainRemindedFor DateTime? @db.Date
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
licences Licence[]
@@ -113,6 +125,12 @@ model Licence {
@@index([customerId, product])
}
enum AddressType {
own_domain
crosscode
included
}
enum BillingCycle {
none
monthly