Prisma adapter with custom User model and local createdAt datetime #3912
Unanswered
AeroFiTech
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have tried to look around but could not find a similar discussion yet on how do we design a custom User Model for NextAuth.
This is the custom User Model (last three items are custom field query from db):
model User {
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
accounts Account[]
sessions Session[]
role String
status String
createdAt DateTime @default(now())
}
Two questions:
Can we append the default User Model as such?
Otherwise, is it recommended to introduce the new fields into a new table?
Can we default the datetime to our local timezone? As it is defaulted to UTC+0 now.
Beta Was this translation helpful? Give feedback.
All reactions