Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415import { defineRelations } from "drizzle-orm";import * as schema from "./schema";
export const relations = defineRelations(schema, (r) => ({ types: { pokemon: r.many.pokemon({ from: r.types.id.through(r.pokemonTypes.typeId), to: r.pokemon.id.through(r.pokemonTypes.pokemonId), }), }, pokemon: { types: r.many.types(), },}));