Spaces:
Sleeping
Sleeping
File size: 618 Bytes
2211d3a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import { pgTable, serial, text, timestamp } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { z } from "zod/v4";
export const conversations = pgTable("conversations", {
id: serial("id").primaryKey(),
title: text("title").notNull(),
createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(),
});
export const insertConversationSchema = createInsertSchema(conversations).omit({
id: true,
createdAt: true,
});
export type Conversation = typeof conversations.$inferSelect;
export type InsertConversation = z.infer<typeof insertConversationSchema>;
|