Skip to content

Instantly share code, notes, and snippets.

@Romakita
Created May 24, 2021 15:47
Show Gist options
  • Save Romakita/b1c7922da0ee59391ad603bf39846e5c to your computer and use it in GitHub Desktop.
Save Romakita/b1c7922da0ee59391ad603bf39846e5c to your computer and use it in GitHub Desktop.
Prisma User
model User {
/// @TsED.Groups("!creation")
/// Comment
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
/// @TsED.Email()
/// @TsED.Description("User email. This email must be unique!")
email String @unique
weight Float?
is18 Boolean?
name String?
successorId Int?
successor User? @relation("BlogOwnerHistory", fields: [successorId], references: [id])
predecessor User? @relation("BlogOwnerHistory")
role Role @default(USER)
posts Post[]
keywords String[]
biography Json
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment