Feat: Add role enum for user table

This commit is contained in:
Aaron William Po
2023-09-23 01:26:36 -04:00
parent bf56ca6058
commit 942f1390f7
11 changed files with 946 additions and 870 deletions

View File

@@ -12,6 +12,11 @@ datasource db {
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
enum Role {
USER
ADMIN
}
model User {
id String @id @default(cuid())
username String @unique
@@ -23,6 +28,7 @@ model User {
updatedAt DateTime? @updatedAt @db.Timestamptz(3)
accountIsVerified Boolean @default(false)
dateOfBirth DateTime
role Role @default(USER)
beerPosts BeerPost[]
beerStyles BeerStyle[]
breweryPosts BreweryPost[]