Update schema table names.

This commit is contained in:
Brian Cao 2022-11-10 11:58:43 -08:00
parent 73a57cd2cf
commit 563589393a

View File

@ -21,6 +21,8 @@ model User {
teamUser TeamUser[] teamUser TeamUser[]
userWebsite UserWebsite[] userWebsite UserWebsite[]
website Website[] website Website[]
@@map("user")
} }
model Session { model Session {
@ -37,6 +39,7 @@ model Session {
@@index([createdAt]) @@index([createdAt])
@@index([websiteId]) @@index([websiteId])
@@map("session")
} }
model Website { model Website {
@ -56,6 +59,7 @@ model Website {
@@index([userId]) @@index([userId])
@@index([createdAt]) @@index([createdAt])
@@index([shareId]) @@index([shareId])
@@map("website")
} }
model WebsiteEvent { model WebsiteEvent {
@ -85,6 +89,8 @@ model Group {
groupRoles GroupRole[] groupRoles GroupRole[]
groupUsers GroupUser[] groupUsers GroupUser[]
@@map("group")
} }
model GroupRole { model GroupRole {
@ -121,6 +127,8 @@ model Permission {
description String? @db.VarChar(255) description String? @db.VarChar(255)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6) createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
isDeleted Boolean @default(false) @map("is_deleted") isDeleted Boolean @default(false) @map("is_deleted")
@@map("permission")
} }
model Role { model Role {
@ -132,6 +140,8 @@ model Role {
groupRoles GroupRole[] groupRoles GroupRole[]
userRoles UserRole[] userRoles UserRole[]
@@map("role")
} }
model UserRole { model UserRole {
@ -155,6 +165,8 @@ model Team {
teamWebsites TeamWebsite[] teamWebsites TeamWebsite[]
teamUsers TeamUser[] teamUsers TeamUser[]
@@map("team")
} }
model TeamWebsite { model TeamWebsite {