Created
May 24, 2021 15:47
-
-
Save Romakita/b1c7922da0ee59391ad603bf39846e5c to your computer and use it in GitHub Desktop.
Prisma User
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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