Feat: add glassware, abv range, and ibu range to beer style table

This commit is contained in:
Aaron William Po
2023-09-22 01:48:37 -04:00
parent af09928c3c
commit e95cb29189
5 changed files with 467 additions and 371 deletions

View File

@@ -33,6 +33,7 @@ model User {
BreweryImage BreweryImage[]
BreweryPostLike BreweryPostLike[]
Location Location[]
Glassware Glassware[]
}
model BeerPost {
@@ -93,10 +94,25 @@ model BeerStyle {
createdAt DateTime @default(now()) @db.Timestamptz(3)
updatedAt DateTime? @updatedAt @db.Timestamptz(3)
postedBy User @relation(fields: [postedById], references: [id], onDelete: Cascade)
glassware Glassware @relation(fields: [glasswareId], references: [id], onDelete: Cascade)
glasswareId String
postedById String
abvRange Float[]
ibuRange Float[]
beerPosts BeerPost[]
}
model Glassware {
id String @id @default(cuid())
name String
description String
createdAt DateTime @default(now()) @db.Timestamptz(3)
updatedAt DateTime? @updatedAt @db.Timestamptz(3)
postedBy User @relation(fields: [postedById], references: [id], onDelete: Cascade)
postedById String
BeerStyle BeerStyle[]
}
model Location {
id String @id @default(cuid())
city String