Is there a better way to access enum types?
is there a better way to do this other than manually creating a type to use everywhere? its not very ergonomic to type this out like that
i can also do something like
but this sucks too
// the schema
export const MarketplaceIntegrationType = pgEnum('MarketplaceIntegrationType', [
'Amazon',
'Walmart',
'Etsy',
'Shopify'
]);
type: MarketplaceIntegrationType('type').notNull()
// the code
let integrationType: typeof marketplaceIntegrations.$inferSelect.type;(typeof MarketplaceIntegrationType.enumValues)[number]