feat: prisma schema User + SyncRun + seed admin

Sets up Prisma 7 with SQLite (better-sqlite3 adapter), User and SyncRun models, migration, and admin seed account for mathieu.fort@gmail.com.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 17:15:54 +02:00
parent 1b60fd79f7
commit 192def9008
9 changed files with 721 additions and 8 deletions
+30
View File
@@ -0,0 +1,30 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
}
model User {
id String @id @default(cuid())
email String @unique
name String
password String
role String @default("gestionnaire")
createdAt DateTime @default(now())
syncRuns SyncRun[]
}
model SyncRun {
id String @id @default(cuid())
createdAt DateTime @default(now())
userId String
user User @relation(fields: [userId], references: [id])
status String
created Int @default(0)
updated Int @default(0)
deactivated Int @default(0)
errors Int @default(0)
log String @default("[]")
}