mirror of
https://github.com/detleph/server.git
synced 2026-09-07 07:56:18 +02:00
Adding VisualElement (v.2.1)
This commit is contained in:
+30
-16
@@ -19,6 +19,7 @@ model Event {
|
|||||||
disciplines Discipline[]
|
disciplines Discipline[]
|
||||||
organisations Organisation[]
|
organisations Organisation[]
|
||||||
campaign Campaign[]
|
campaign Campaign[]
|
||||||
|
visual VisualElement[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model Campaign {
|
model Campaign {
|
||||||
@@ -44,10 +45,10 @@ model Link {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Admin {
|
model Admin {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
pid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
pid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
||||||
name String @unique
|
name String @unique
|
||||||
password String // TODO: Probably specify hash size (VarChar or some other type)
|
password String // TODO: Probably specify hash size (VarChar or some other type)
|
||||||
|
|
||||||
permission_level AdminLevel @default(STANDARD)
|
permission_level AdminLevel @default(STANDARD)
|
||||||
revision DateTime @default(now())
|
revision DateTime @default(now())
|
||||||
@@ -55,16 +56,17 @@ model Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Discipline {
|
model Discipline {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
pid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
pid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
||||||
name String
|
name String
|
||||||
minTeamSize Int
|
minTeamSize Int
|
||||||
maxTeamSize Int
|
maxTeamSize Int
|
||||||
roles RoleSchema[]
|
roles RoleSchema[]
|
||||||
|
|
||||||
teams Team[]
|
teams Team[]
|
||||||
event Event @relation(fields: [eventId], references: [id])
|
event Event @relation(fields: [eventId], references: [id])
|
||||||
eventId Int
|
eventId Int
|
||||||
|
visual VisualElement[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model RoleSchema {
|
model RoleSchema {
|
||||||
@@ -74,8 +76,9 @@ model RoleSchema {
|
|||||||
schema Json
|
schema Json
|
||||||
|
|
||||||
roles Role[]
|
roles Role[]
|
||||||
discipline Discipline @relation(fields: [disciplineId], references: [id])
|
discipline Discipline @relation(fields: [disciplineId], references: [id])
|
||||||
disciplineId Int
|
disciplineId Int
|
||||||
|
visual VisualElement[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model Team {
|
model Team {
|
||||||
@@ -95,18 +98,18 @@ model Participant {
|
|||||||
firstName String
|
firstName String
|
||||||
lastName String
|
lastName String
|
||||||
gender Gender
|
gender Gender
|
||||||
|
relevance Job
|
||||||
|
|
||||||
group Group @relation(fields: [groupId], references: [id])
|
group Group @relation(fields: [groupId], references: [id])
|
||||||
groupId Int
|
groupId Int
|
||||||
roles Role[]
|
roles Role[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model Role {
|
model Role {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
pid String @unique @default(dbgenerated("gen_random"))
|
pid String @unique @default(dbgenerated("gen_random"))
|
||||||
name String //e.g. runner, swimmer,...
|
name String //e.g. runner, swimmer,...
|
||||||
importance Job
|
score String
|
||||||
score String
|
|
||||||
|
|
||||||
participant Participant? @relation(fields: [participantId], references: [id])
|
participant Participant? @relation(fields: [participantId], references: [id])
|
||||||
participantId Int?
|
participantId Int?
|
||||||
@@ -140,6 +143,17 @@ model Group {
|
|||||||
admins Admin[]
|
admins Admin[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model VisualElement {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
pid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
||||||
|
description String
|
||||||
|
location String
|
||||||
|
|
||||||
|
event Event[]
|
||||||
|
discipline Discipline[]
|
||||||
|
role RoleSchema[]
|
||||||
|
}
|
||||||
|
|
||||||
enum AdminLevel {
|
enum AdminLevel {
|
||||||
STANDARD
|
STANDARD
|
||||||
ELEVATED
|
ELEVATED
|
||||||
|
|||||||
Reference in New Issue
Block a user