feat(donate): add donate UI
- rework form core and migrate all old usages
This commit is contained in:
@@ -342,6 +342,19 @@ export const guides = pgTable("guides", {
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Donate
|
||||
export const schDonate = pgSchema("donate");
|
||||
|
||||
export const donations = schDonate.table("donations", {
|
||||
id: text().primaryKey().$defaultFn(uuidv7),
|
||||
name: text().notNull(),
|
||||
amount: numeric().notNull(),
|
||||
image: bytea(),
|
||||
message: text(),
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Better Auth
|
||||
export const user = pgTable("user", {
|
||||
id: text("id").primaryKey(),
|
||||
|
||||
@@ -31,6 +31,17 @@ export const sse = sseEndpointMap({
|
||||
}),
|
||||
),
|
||||
},
|
||||
donate: {
|
||||
ping: z.object({
|
||||
name: z.string(),
|
||||
amount: z.number(),
|
||||
image: z.string(),
|
||||
message: z.string(),
|
||||
}),
|
||||
// roundtrip SSE system check
|
||||
heartbeat: z.number(),
|
||||
update: z.null(),
|
||||
},
|
||||
// Passive Update Checker
|
||||
active: {
|
||||
version: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user