Skip to content

Commit

Permalink
Updated prisma schema
Browse files Browse the repository at this point in the history
Co-authored-by: DankaMarci <[email protected]>
Co-authored-by: BalintKing <[email protected]>
  • Loading branch information
3 people committed Dec 7, 2024
1 parent 7dbcc42 commit 2a345eb
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions apps/backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ model User {
bandMemberships BandMembership[]
reservations Reservation[] @relation("Reservations")
gateKeeping Reservation[] @relation("GateKeeping")
cardRight CardRight?
profilePicture ProfilePicture?
}

model ProfilePicture {
id Int @id @default(autoincrement())
user User @relation(fields: [userId], references: [id])
userId Int @unique
mimeType String
profileImage Bytes
}

model CardRight {
id Int @id @default(autoincrement())
userId Int @unique
user User @relation(fields: [userId], references: [id])
}

enum ReservationStatus {
Expand All @@ -50,16 +66,10 @@ model Reservation {
status ReservationStatus
}

model Genre {
id Int @id @default(autoincrement())
name String
bands Band[]
}

model Band {
id Int @id @default(autoincrement())
name String
genres Genre[]
genres String?
members BandMembership[]
reservations Reservation[]
email String?
Expand All @@ -82,8 +92,15 @@ model BandMembership {
}

model Comment {
id Int @id @default(autoincrement())
comment String
startTime DateTime
endTime DateTime
isReservable Boolean
}

model Period {
id Int @id @default(autoincrement())
comment String
startTime DateTime
endTime DateTime
startDate DateTime
endDate DateTime
}

0 comments on commit 2a345eb

Please sign in to comment.