Enum
Enums are simple constructs that allow you to define a set of named values.
enum Role {
USER
ADMIN
}
They can be used to type model fields:
model User {
id Int @id
role Role @default(USER)
}
Enum field names are added to the global scope and are resolved without qualification. You need to make sure they don't collide with other global names.