ajout de la table preference des utilisateurs

This commit is contained in:
2026-03-31 13:25:43 +02:00
parent 5e7e7b69e9
commit e0f862b361
2 changed files with 10 additions and 1 deletions

View File

@@ -41,4 +41,13 @@ model User {
encryptedPrivateKey String?
ActionToken ActionToken[]
AuthToken AuthToken[]
UserPreference UserPreference?
}
model UserPreference {
id String @id @default(uuid())
userId String @unique
language String @default("fr")
theme String @default("light")
User User @relation(fields: [userId], references: [id], onDelete: Cascade)
}

View File

@@ -22,7 +22,7 @@ export async function registerUser(
// 2. Hash du mot de passe
const passwordHash = await argon2.hash(input.password)
// 3. Création de l'user
// 3. Création du user
const displayName = input.email.split('@')[0]
const user = await prisma.user.create({
data: {