feat:UX and fix drinkkaart payment logic
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- Migration: Track when a watcher's registration fee has been credited to their drinkkaart
|
||||
ALTER TABLE `registration` ADD COLUMN `drinkkaart_credited_at` integer;
|
||||
@@ -32,6 +32,12 @@ export const registration = sqliteTable(
|
||||
lemonsqueezyOrderId: text("lemonsqueezy_order_id"),
|
||||
lemonsqueezyCustomerId: text("lemonsqueezy_customer_id"),
|
||||
paidAt: integer("paid_at", { mode: "timestamp_ms" }),
|
||||
// Set when the drinkCardValue has been credited to the user's drinkkaart.
|
||||
// Null means not yet credited (either unpaid, account doesn't exist yet, or
|
||||
// the registration is a performer). Used to prevent double-crediting.
|
||||
drinkkaartCreditedAt: integer("drinkkaart_credited_at", {
|
||||
mode: "timestamp_ms",
|
||||
}),
|
||||
createdAt: integer("created_at", { mode: "timestamp_ms" })
|
||||
.default(sql`(cast(unixepoch('subsecond') * 1000 as integer))`)
|
||||
.notNull(),
|
||||
|
||||
Reference in New Issue
Block a user