Refactor codebase, format

This commit is contained in:
Aaron William Po
2023-02-09 04:03:11 -05:00
parent e654216c1a
commit dbd342fd3e
26 changed files with 517 additions and 809 deletions

View File

@@ -25,29 +25,29 @@ model User {
breweryPosts BreweryPost[]
beerComments BeerComment[]
breweryComments BreweryComment[]
BeerPostLikes BeerPostLikes[]
BeerPostLikes BeerPostLike[]
}
model BeerPost {
id String @id @default(uuid())
id String @id @default(uuid())
name String
ibu Float
abv Float
description String
postedBy User @relation(fields: [postedById], references: [id], onDelete: Cascade)
postedBy User @relation(fields: [postedById], references: [id], onDelete: Cascade)
postedById String
brewery BreweryPost @relation(fields: [breweryId], references: [id], onDelete: Cascade)
brewery BreweryPost @relation(fields: [breweryId], references: [id], onDelete: Cascade)
breweryId String
type BeerType @relation(fields: [typeId], references: [id], onDelete: Cascade)
type BeerType @relation(fields: [typeId], references: [id], onDelete: Cascade)
typeId String
createdAt DateTime @default(now()) @db.Timestamptz(3)
updatedAt DateTime? @updatedAt @db.Timestamptz(3)
createdAt DateTime @default(now()) @db.Timestamptz(3)
updatedAt DateTime? @updatedAt @db.Timestamptz(3)
beerComments BeerComment[]
beerImages BeerImage[]
BeerPostLikes BeerPostLikes[]
BeerPostLikes BeerPostLike[]
}
model BeerPostLikes {
model BeerPostLike {
id String @id @default(uuid())
beerPost BeerPost @relation(fields: [beerPostId], references: [id], onDelete: Cascade)
beerPostId String