basic db implementation

This commit is contained in:
CoGomu
2025-06-14 15:59:23 +02:00
committed by quirinecker
parent 3b59620b98
commit aed6e88011
6 changed files with 231 additions and 19 deletions

12
backend/src/db/schema.ts Normal file
View File

@@ -0,0 +1,12 @@
import { sqliteTable, int, text } from 'drizzle-orm/sqlite-core'
export const event = sqliteTable('event', {
id: int().primaryKey({ autoIncrement: true }),
userid: text().notNull(),
title: text().notNull(),
description: text().notNull(),
from: text().notNull(),
to: text().notNull(),
created_at: text().notNull().default(new Date().toISOString()),
updated_at: text().notNull().default(new Date().toISOString())
})