zod-prisma-types
zod-prisma-types copied to clipboard
[Feature Request] Create scalar enums of relations when createRelationValuesTypes is true
I am attempting to get the list of relations on a model. The createRelationValuesTypes flag could be useful for this, except it only provides types and a Schema. I don't seem to be able to find a simple list of the relations within the schema (this may be an issue on my end with my lack of understanding with Zod, the schema generated is complicated). It would be useful to generate an Enum that contains the relations of the model. It generates this as a type, which doesn't allow me to read the data at runtime.