prisma-ast will now parse attributes on enums
enum Role {
USER @map("usr")
ADMIN @map("adm")
ORGANIZATION @map("org") // deprecated
@@map("roles")
}
and you can add attributes using PrismaSchemaBuilder
builder.enum("Role").enumerator("GUEST").attribute("map", ['"gst"'])
which produces the following output
enum Role {
USER @map("usr")
ADMIN @map("adm")
ORGANIZATION @map("org") // deprecated
GUEST @map("gst")
@@map("roles")
}