feat(db): create schema & config files
This commit is contained in:
parent
7879167b13
commit
93b90dc1c4
3 changed files with 39 additions and 0 deletions
19
src/db/schema.ts
Normal file
19
src/db/schema.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { text, integer, sqliteTable } from 'drizzle-orm/sqlite-core';
|
||||
|
||||
export const messages = sqliteTable('messages', {
|
||||
id: integer('id').primaryKey(),
|
||||
content: text('content').notNull(),
|
||||
chatId: text('chatId').notNull(),
|
||||
messageId: text('messageId').notNull(),
|
||||
role: text('type', { enum: ['assistant', 'user'] }),
|
||||
metadata: text('metadata', {
|
||||
mode: 'json',
|
||||
}),
|
||||
});
|
||||
|
||||
export const chats = sqliteTable('chats', {
|
||||
id: text('id').primaryKey(),
|
||||
title: text('title').notNull(),
|
||||
createdAt: text('createdAt').notNull(),
|
||||
focusMode: text('focusMode').notNull(),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue