fix: 解决问题

This commit is contained in:
2025-12-28 10:52:04 +08:00
parent 868979a423
commit 9f51d27398
18 changed files with 57061 additions and 201 deletions

14
src/db/schema.ts Normal file
View File

@@ -0,0 +1,14 @@
import { pgTable, serial, text, varchar, uuid, boolean, jsonb, timestamp } from "drizzle-orm/pg-core";
import { InferSelectModel, InferInsertModel } from "drizzle-orm";
export const aiUsages = pgTable('cf_ai_usage_cache', {
id: uuid('id').primaryKey().defaultRandom(),
owner: uuid('owner'),
data: jsonb('data').notNull().default({}),
createdAt: timestamp('createdAt').notNull().defaultNow(),
updatedAt: timestamp('updatedAt').notNull().defaultNow(),
deletedAt: timestamp('deletedAt'),
});
// 类型推断
export type AiUsage = InferSelectModel<typeof aiUsages>;