fix: 解决问题
This commit is contained in:
14
src/db/schema.ts
Normal file
14
src/db/schema.ts
Normal 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>;
|
||||
Reference in New Issue
Block a user