feat: add profiles session API

This commit is contained in:
Matthieu
2025-09-17 23:11:25 +02:00
parent 83251b532c
commit df5bbeecb7
78 changed files with 3000 additions and 836 deletions

View File

@@ -0,0 +1,12 @@
CREATE TABLE "profiles" (
"id" TEXT PRIMARY KEY,
"firstName" TEXT NOT NULL,
"lastName" TEXT NOT NULL,
"isActive" BOOLEAN NOT NULL DEFAULT TRUE,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO "profiles" ("id", "firstName", "lastName")
VALUES ('admin-default-profile', 'Admin', 'General')
ON CONFLICT DO NOTHING;

View File

@@ -177,6 +177,17 @@ model Constructeur {
@@map("constructeurs")
}
model Profile {
id String @id @default(cuid())
firstName String
lastName String
isActive Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@map("profiles")
}
model Document {
id String @id @default(cuid())
name String