Enum data type
M
Makenna Smutz
Extremely important for me too for full type safety.
Max
I think this is the only data type I require to be able to migrate from Prisma. In Prisma I would define an enum as follows:
enum OrderStatus {
Pending
Shipped
Delivered
Canceled
}
enum UserRole {
Admin
User
Guest
}
It would also be cool if the enum could be mapped to values which could be useful if interfacing with other systems. Eg,
enum OrderStatus {
Pending = 0
Shipped = 1
Delivered = 2
Canceled = 3
}
enum UserRole {
Admin = "admin"
User = "user"
Guest = "guest"
}