Models.ts 338 B

12345678910111213
  1. import { Model, InferSchemaType, Schema } from "mongoose";
  2. import { AbcSchema } from "../schemas/abc";
  3. import { StationSchema } from "../schemas/station";
  4. export type Schemas = {
  5. abc: Schema<AbcSchema>;
  6. station: Schema<StationSchema>;
  7. };
  8. export type Models = Record<
  9. keyof Schemas,
  10. Model<InferSchemaType<Schemas[keyof Schemas]>>
  11. >;