Files
professor/db/schema.ts
Aodhan Collins f644937604 Initial commit — AI-powered coding tutor (Professor)
Next.js 16, React 19, Monaco editor, Anthropic SDK, multi-provider AI,
Wandbox Python execution, iframe HTML preview, SQLite auth + session persistence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 21:48:34 +00:00

22 lines
665 B
TypeScript

import { text, sqliteTable } from 'drizzle-orm/sqlite-core';
export const users = sqliteTable('users', {
id: text('id').primaryKey(),
email: text('email').notNull().unique(),
passwordHash: text('password_hash').notNull(),
createdAt: text('created_at').notNull(),
});
export const savedSessions = sqliteTable('saved_sessions', {
id: text('id').primaryKey(),
userId: text('user_id')
.notNull()
.references(() => users.id),
topicId: text('topic_id'),
taskJson: text('task_json'),
code: text('code'),
messagesJson: text('messages_json'),
executionResultJson: text('execution_result_json'),
updatedAt: text('updated_at').notNull(),
});