@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
24 lines (17 loc) • 657 B
text/typescript
/* eslint-disable sort-keys-fix/sort-keys-fix */
import { integer, jsonb, pgTable, text, uuid } from 'drizzle-orm/pg-core';
import { timestamps } from './_helpers';
import { users } from './user';
export const asyncTasks = pgTable('async_tasks', {
id: uuid('id').defaultRandom().primaryKey(),
type: text('type'),
status: text('status'),
error: jsonb('error'),
userId: text('user_id')
.references(() => users.id, { onDelete: 'cascade' })
.notNull(),
duration: integer('duration'),
...timestamps,
});
export type NewAsyncTaskItem = typeof asyncTasks.$inferInsert;
export type AsyncTaskSelectItem = typeof asyncTasks.$inferSelect;