Update Site source

This commit is contained in:
Meghdad committed 2026-10-12 23:20:56 +03:30
commit 9a4ce930c7
126 files changed
+25723

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import { env } from "cloudflare:workers";
import { drizzle } from "drizzle-orm/d1";
import * as schema from "./schema";
export function getDb() {
if (!env.DB) {
throw new Error(
"Cloudflare D1 binding `DB` is unavailable. Set the `d1` field in .openai/hosting.json to `DB` or let your control plane inject the real binding values before using the database."
);
}
return drizzle(env.DB, { schema });
}
+4
View File
@@ -0,0 +1,4 @@
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';
export const transactions = sqliteTable('transactions', {
id: text('id').primaryKey(), date: text('date').notNull(), player: text('player').notNull(), reason: text('reason').notNull(), amount: integer('amount').notNull(), importedAt: text('imported_at').notNull(), importedBy: text('imported_by').notNull(),
});