sdy

update DB schema

......@@ -18,18 +18,17 @@ model User {
emailSecret String? @default("")
phoneSecret String? @default("")
bio String? @default("")
room Room @relation(fields: [roomId], references: [id])
roomId Int
rooms Room[] @relation(references: [id])
messages Message[]
sender User @relation("SenderReceiver", fields: [id], references: [id])
receiver User? @relation("SenderReceiver")
sender User[] @relation("SenderReceiver", references: [id])
receiver User[] @relation("SenderReceiver", references: [id])
createdAt DateTime? @default(now())
}
model Room {
id Int @default(autoincrement()) @id
name String
participants User[]
participants User[] @relation(references: [id])
categories Category[]
messages Message[]
}
......