mirror of
https://github.com/detleph/server.git
synced 2026-09-04 00:26:03 +02:00
Add leader fields
This commit is contained in:
@@ -75,9 +75,11 @@ model Team {
|
|||||||
pid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
pid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
||||||
name String
|
name String
|
||||||
|
|
||||||
participants Participant[]
|
participants Participant[] @relation(name: "participants")
|
||||||
discipline Discipline @relation(fields: [disciplineId], references: [id])
|
discipline Discipline @relation(fields: [disciplineId], references: [id])
|
||||||
disciplineId Int
|
disciplineId Int
|
||||||
|
leader Participant @relation(name: "leader", fields: [leaderId], references: [id])
|
||||||
|
leaderId Int
|
||||||
}
|
}
|
||||||
|
|
||||||
model Participant {
|
model Participant {
|
||||||
@@ -87,8 +89,9 @@ model Participant {
|
|||||||
lastName String
|
lastName String
|
||||||
email String
|
email String
|
||||||
|
|
||||||
team Team @relation(fields: [teamId], references: [id])
|
team Team @relation(name: "participants", fields: [teamId], references: [id])
|
||||||
teamId Int
|
teamId Int
|
||||||
|
leaderOf Team? @relation(name: "leader")
|
||||||
roles Role[]
|
roles Role[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user