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:
@@ -0,0 +1,13 @@
|
||||
-- Hub 2.0: the church's address (own domain R0, Cross Code address R10, domain included R25), one per
|
||||
-- customer. Existing churches use their own domain.
|
||||
|
||||
-- CreateEnum
|
||||
CREATE TYPE "AddressType" AS ENUM ('own_domain', 'crosscode', 'included');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Customer" ADD COLUMN "addressCustomCents" INTEGER,
|
||||
ADD COLUMN "addressType" "AddressType" NOT NULL DEFAULT 'own_domain',
|
||||
ADD COLUMN "domain" TEXT,
|
||||
ADD COLUMN "domainRemindedFor" DATE,
|
||||
ADD COLUMN "domainRenewsOn" DATE;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user