feat(donate): add donate UI

- rework form core and migrate all old usages
This commit is contained in:
2026-06-05 15:24:41 +07:00 Unverified
parent 5efc86b6c8
commit 75e711144f
32 changed files with 1710 additions and 244 deletions
+13
View File
@@ -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(),
+11
View File
@@ -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(),