import type { BuildQueryResult, DBQueryConfig, ExtractTablesWithRelations, } from "drizzle-orm"; import type * as schema from "../database/schema" type TSchema = ExtractTablesWithRelations; type QueryConfig = DBQueryConfig<"one" | "many", boolean, TSchema, TSchema[TableName]>; export type InferQueryModel< TableName extends keyof TSchema, QBConfig extends QueryConfig = {} > = BuildQueryResult;