Connect app to MySQL database at 192.168.4.20

This commit is contained in:
2025-12-01 18:45:48 +00:00
commit 0cfcd05921
16 changed files with 6302 additions and 0 deletions

30
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,30 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model List {
id String @id @default(cuid())
title String
color String @default("#3B82F6")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
items Item[]
}
model Item {
id String @id @default(cuid())
title String
description String?
completed Boolean @default(false)
priority String @default("medium") // low, medium, high
dueDate DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
listId String
list List @relation(fields: [listId], references: [id], onDelete: Cascade)
}