feat: recorded import grants, unclaimed creators and claiming (#15)
Co-authored-by: dhkatz <[email protected]>
This commit was merged in pull request #15.
This commit is contained in:
1 parent
e6a97be894
commit
8f6dacba10
18 files changed
+5222
-26
No files matched your search
@@ -47,6 +47,9 @@ export const user = pgTable(
|
||||
approved: boolean("approved").notNull().default(true),
|
||||
// Two-factor sign-in (an authenticator app), required for sensitive permissions (docs/console.md).
|
||||
twoFactorEnabled: boolean("two_factor_enabled").notNull().default(false),
|
||||
// An unclaimed creator (docs/imports.md): a placeholder without credentials for an IMVU creator whose consent an
|
||||
// admin recorded; its IMVU account. Whoever links that account can claim what it has.
|
||||
unclaimedImvuId: bigint("unclaimed_imvu_id", { mode: "number" }).unique(),
|
||||
},
|
||||
(t) => [uniqueIndex("user_username_lower").on(sql`lower(${t.username})`)],
|
||||
);
|
||||
@@ -747,6 +750,9 @@ export const importGrant = pgTable(
|
||||
consentKind: text("consent_kind").notNull().default("verified"), // "verified" (the creator), "recorded" (an admin)
|
||||
evidence: text("evidence").notNull().default(""), // recorded: how they agreed
|
||||
recordedBy: text("recorded_by").references(() => user.id, { onDelete: "set null" }),
|
||||
// Recorded: proof without an account, a code the creator put in their IMVU tagline, and when the hub saw it.
|
||||
proofCode: text("proof_code"),
|
||||
proofCheckedAt: timestamp("proof_checked_at", { withTimezone: true }),
|
||||
// "pending" (the catalog's team hasn't accepted), "active", "declined", "suspended", "withdrawn".
|
||||
status: text("status").notNull().default("pending"),
|
||||
statusReason: text("status_reason").notNull().default(""),
|
||||
|
||||
Reference in new issue
Block a user