dev
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
model ConnectedDispatch {
|
||||
model ConnectedDispatcher {
|
||||
id Int @id @default(autoincrement())
|
||||
userId String
|
||||
publicUser Json
|
||||
14
packages/database/prisma/schema/report.prisma
Normal file
14
packages/database/prisma/schema/report.prisma
Normal file
@@ -0,0 +1,14 @@
|
||||
model Report {
|
||||
id Int @id @default(autoincrement())
|
||||
text String
|
||||
senderUserId String
|
||||
reportedUserId String
|
||||
timestamp DateTime @default(now())
|
||||
reviewed Boolean @default(false)
|
||||
reviewerUserId String?
|
||||
|
||||
// relations:
|
||||
sender User @relation("SentReports", fields: [senderUserId], references: [id])
|
||||
reported User @relation("ReceivedReports", fields: [reportedUserId], references: [id])
|
||||
reviewer User? @relation("ReviewedReports", fields: [reviewerUserId], references: [id])
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
model ReportMessage {
|
||||
id Int @id @default(autoincrement())
|
||||
text String
|
||||
senderId String
|
||||
reportedId String
|
||||
timestamp DateTime @default(now())
|
||||
erledigt Boolean @default(false)
|
||||
|
||||
// relations:
|
||||
sender User @relation("SentReports", fields: [senderId], references: [id])
|
||||
reported User @relation("ReceivedReports", fields: [reportedId], references: [id])
|
||||
}
|
||||
@@ -43,14 +43,12 @@ model User {
|
||||
EventAppointment EventAppointment[]
|
||||
SentMessages ChatMessage[] @relation("SentMessages")
|
||||
ReceivedMessages ChatMessage[] @relation("ReceivedMessages")
|
||||
SentReports ReportMessage[] @relation("SentReports")
|
||||
ReceivedReports ReportMessage[] @relation("ReceivedReports")
|
||||
/**
|
||||
* Missions Mission[]
|
||||
*/
|
||||
SentReports Report[] @relation("SentReports")
|
||||
ReceivedReports Report[] @relation("ReceivedReports")
|
||||
ReviewedReports Report[] @relation("ReviewedReports")
|
||||
Mission Mission[]
|
||||
MissionOnStationUsers MissionOnStationUsers[]
|
||||
ConnectedDispatch ConnectedDispatch[]
|
||||
ConnectedDispatcher ConnectedDispatcher[]
|
||||
connectedAircraft connectedAircraft[]
|
||||
PositionLog PositionLog[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user