-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
// prisma/schema.prisma
enum Role {
USER
ADMIN
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
password String @default("")
posts Post[] @relation("author") // One-to-many relation
profile Profile? @relation("profile") // One-to-one relation
birthDate DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
role Role @default(USER)
}
For the User model, do you have a suggestion on how to create two different list views of the User model ?
I'd like it to be two different pages in my webapp, example:
/User/UserAdmin
The User model configuration for both routes is different in each case
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels