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:
@@ -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("[]")
|
||||
}
|
||||
Reference in New Issue
Block a user