mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-05-13 17:21:53 +00:00
Add sex to User db model
Took 3 minutes
This commit is contained in:
+11
-4
@@ -10,16 +10,18 @@ datasource db {
|
||||
|
||||
// Models
|
||||
model User {
|
||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||
email String @unique
|
||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||
email String @unique
|
||||
password String
|
||||
firstName String?
|
||||
lastName String?
|
||||
bio String?
|
||||
location String?
|
||||
images String[]
|
||||
role Role @default(USER)
|
||||
createdAt DateTime @default(now())
|
||||
birthdate DateTime?
|
||||
sex Sex?
|
||||
role Role @default(USER)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
// Liste des chats de l'utilisateur
|
||||
ChatID String[] @db.ObjectId
|
||||
@@ -73,6 +75,11 @@ model Message {
|
||||
Chat Chat? @relation(fields: [ChatID], references: [id])
|
||||
}
|
||||
|
||||
enum Sex {
|
||||
MALE
|
||||
FEMALE
|
||||
}
|
||||
|
||||
enum Role {
|
||||
USER
|
||||
ADMIN
|
||||
|
||||
Reference in New Issue
Block a user