Report logic #2
This commit is contained in:
13
packages/database/prisma/schema/reportMessage.prisma
Normal file
13
packages/database/prisma/schema/reportMessage.prisma
Normal file
@@ -0,0 +1,13 @@
|
||||
model ReportMessage {
|
||||
id Int @id @default(autoincrement())
|
||||
text String
|
||||
senderId String
|
||||
reportedId String
|
||||
timestamp DateTime @default(now())
|
||||
reportedName String
|
||||
senderName String
|
||||
|
||||
// relations:
|
||||
sender User @relation("SentReports", fields: [senderId], references: [id])
|
||||
reported User @relation("ReceivedReports", fields: [reportedId], references: [id])
|
||||
}
|
||||
@@ -43,6 +43,8 @@ model User {
|
||||
EventAppointment EventAppointment[]
|
||||
SentMessages ChatMessage[] @relation("SentMessages")
|
||||
ReceivedMessages ChatMessage[] @relation("ReceivedMessages")
|
||||
SentReports ReportMessage[] @relation("SentReports")
|
||||
ReceivedReports ReportMessage[] @relation("ReceivedReports")
|
||||
/**
|
||||
* Missions Mission[]
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user