mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-07-09 06:58:06 +00:00
Update schema.prisma
Took 24 minutes
This commit is contained in:
+10
-2
@@ -22,8 +22,7 @@ model User {
|
|||||||
gender Gender @default(UNKNOWN)
|
gender Gender @default(UNKNOWN)
|
||||||
role Role @default(USER)
|
role Role @default(USER)
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @default(now())
|
updatedAt DateTime @updatedAt
|
||||||
lastConnexion DateTime @default(now())
|
|
||||||
|
|
||||||
// Liste des chats de l'utilisateur
|
// Liste des chats de l'utilisateur
|
||||||
ChatID String[] @db.ObjectId
|
ChatID String[] @db.ObjectId
|
||||||
@@ -53,12 +52,17 @@ model User {
|
|||||||
model Notification {
|
model Notification {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
type NotificationType
|
type NotificationType
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
hasBeenConsulted Boolean @default(false)
|
||||||
|
|
||||||
UserId String @db.ObjectId
|
UserId String @db.ObjectId
|
||||||
User User @relation(fields: [UserId], references: [id])
|
User User @relation(fields: [UserId], references: [id])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Match {
|
model Match {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
|
||||||
UserId String[] @db.ObjectId
|
UserId String[] @db.ObjectId
|
||||||
User User[] @relation(fields: [UserId], references: [id])
|
User User[] @relation(fields: [UserId], references: [id])
|
||||||
}
|
}
|
||||||
@@ -66,6 +70,8 @@ model Match {
|
|||||||
model Passion {
|
model Passion {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
name String
|
name String
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
updatedAt DateTime @updatedAt
|
||||||
|
|
||||||
// Les utilisateurs qui on en commun cette passion
|
// Les utilisateurs qui on en commun cette passion
|
||||||
UserId String[] @db.ObjectId
|
UserId String[] @db.ObjectId
|
||||||
@@ -75,6 +81,7 @@ model Passion {
|
|||||||
model Chat {
|
model Chat {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
messages Message[]
|
messages Message[]
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
|
||||||
// Les utilisateurs qui ont un chat en commun
|
// Les utilisateurs qui ont un chat en commun
|
||||||
User User[] @relation(fields: [UserId], references: [id])
|
User User[] @relation(fields: [UserId], references: [id])
|
||||||
@@ -85,6 +92,7 @@ model Message {
|
|||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
message String
|
message String
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
updatedAt DateTime @updatedAt
|
||||||
|
|
||||||
// L'utilisateur qui a envoyé le message
|
// L'utilisateur qui a envoyé le message
|
||||||
UserID String @db.ObjectId
|
UserID String @db.ObjectId
|
||||||
|
|||||||
Reference in New Issue
Block a user