this repo has no description
1import { defineRelations } from "drizzle-orm";
2import * as schema from "./schema";
3
4export const relations = defineRelations(schema, (r) => ({
5 types: {
6 pokemon: r.many.pokemon({
7 from: r.types.id.through(r.pokemonTypes.typeId),
8 to: r.pokemon.id.through(r.pokemonTypes.pokemonId),
9 }),
10 },
11 pokemon: {
12 types: r.many.types(),
13 },
14}));