- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 125
Closed
Labels
Milestone
Description
Description and expected behavior
If you specify @@auth on a model but also have a User model defined, Zenstack uses the User model for the AuthUser type.
model AuthUser {
    @@auth
    id String @id
}
model User {
    id String @id @default(cuid())
}
With the models above, enhance expects a type matching User despite me marking AuthUser as @@auth.
Currently my workaround is to not use @@auth, and name my AuthUser model User, but that's forced me to name my "real" User model to something else, which I don't want to do.
model User {
    id String @id
}
model RealUser {
    id String @id @default(cuid())
}
Expected behaviour
I can use @@auth on a Model and still define a User model myself.
Environment (please complete the following information)
- ZenStack version: 2.5.1
- Prisma version: 5.18.0
- Database type: Postgresql