Switched Earthquake, Observatory and Artefact creator to a user
This commit is contained in:
parent
a56579ea0b
commit
8a48857ac0
@ -19,6 +19,9 @@ model User {
|
|||||||
scientist Scientist? @relation
|
scientist Scientist? @relation
|
||||||
purchasedOrders Order[] @relation("UserOrders")
|
purchasedOrders Order[] @relation("UserOrders")
|
||||||
requests Request[] @relation("UserRequests")
|
requests Request[] @relation("UserRequests")
|
||||||
|
earthquakes Earthquake[] @relation("UserEarthquakeCreator")
|
||||||
|
observatories Observatory[] @relation("UserObservatoryCreator")
|
||||||
|
artefacts Artefact[] @relation("UserArtefactCreator")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Request {
|
model Request {
|
||||||
@ -41,9 +44,6 @@ model Scientist {
|
|||||||
superior Scientist? @relation("SuperiorRelation", fields: [superiorId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
superior Scientist? @relation("SuperiorRelation", fields: [superiorId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
||||||
superiorId Int?
|
superiorId Int?
|
||||||
subordinates Scientist[] @relation("SuperiorRelation")
|
subordinates Scientist[] @relation("SuperiorRelation")
|
||||||
earthquakes Earthquake[] @relation("ScientistEarthquakeCreator")
|
|
||||||
observatories Observatory[] @relation("ScientistObservatoryCreator")
|
|
||||||
artefacts Artefact[] @relation("ScientistArtefactCreator")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model Earthquake {
|
model Earthquake {
|
||||||
@ -59,7 +59,7 @@ model Earthquake {
|
|||||||
location String
|
location String
|
||||||
depth String
|
depth String
|
||||||
creatorId Int?
|
creatorId Int?
|
||||||
creator Scientist? @relation("ScientistEarthquakeCreator", fields: [creatorId], references: [id])
|
creator User? @relation("UserEarthquakeCreator", fields: [creatorId], references: [id])
|
||||||
artefacts Artefact[]
|
artefacts Artefact[]
|
||||||
observatories Observatory[] @relation("EarthquakeObservatory")
|
observatories Observatory[] @relation("EarthquakeObservatory")
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ model Observatory {
|
|||||||
isFunctional Boolean
|
isFunctional Boolean
|
||||||
seismicSensorOnline Boolean @default(true)
|
seismicSensorOnline Boolean @default(true)
|
||||||
creatorId Int?
|
creatorId Int?
|
||||||
creator Scientist? @relation("ScientistObservatoryCreator", fields: [creatorId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
creator User? @relation("UserObservatoryCreator", fields: [creatorId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
||||||
earthquakes Earthquake[] @relation("EarthquakeObservatory")
|
earthquakes Earthquake[] @relation("EarthquakeObservatory")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ model Artefact {
|
|||||||
earthquakeId Int
|
earthquakeId Int
|
||||||
earthquake Earthquake @relation(fields: [earthquakeId], references: [id])
|
earthquake Earthquake @relation(fields: [earthquakeId], references: [id])
|
||||||
creatorId Int?
|
creatorId Int?
|
||||||
creator Scientist? @relation("ScientistArtefactCreator", fields: [creatorId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
creator User? @relation("UserArtefactCreator", fields: [creatorId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
||||||
isRequired Boolean @default(true)
|
isRequired Boolean @default(true)
|
||||||
dateAddedToShop DateTime?
|
dateAddedToShop DateTime?
|
||||||
shopPrice Float?
|
shopPrice Float?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user