feat: support resuming ongoing streams (#974)
This commit is contained in:
parent
45978c27a2
commit
a3221fbcdc
13 changed files with 1005 additions and 47 deletions
|
|
@ -150,3 +150,21 @@ export const suggestion = pgTable(
|
|||
);
|
||||
|
||||
export type Suggestion = InferSelectModel<typeof suggestion>;
|
||||
|
||||
export const stream = pgTable(
|
||||
'Stream',
|
||||
{
|
||||
id: uuid('id').notNull().defaultRandom(),
|
||||
chatId: uuid('chatId').notNull(),
|
||||
createdAt: timestamp('createdAt').notNull(),
|
||||
},
|
||||
(table) => ({
|
||||
pk: primaryKey({ columns: [table.id] }),
|
||||
chatRef: foreignKey({
|
||||
columns: [table.chatId],
|
||||
foreignColumns: [chat.id],
|
||||
}),
|
||||
}),
|
||||
);
|
||||
|
||||
export type Stream = InferSelectModel<typeof stream>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue