Models.ts 512 B

123456789101112131415161718192021
  1. import { Model, Schema } from "mongoose";
  2. import { AbcSchema } from "../schemas/abc";
  3. import { NewsQueryHelpers, NewsSchema } from "../schemas/news";
  4. import { StationSchema } from "../schemas/station";
  5. export type Schemas = {
  6. abc: Schema<AbcSchema>;
  7. news: Schema<
  8. NewsSchema,
  9. Model<NewsSchema, NewsQueryHelpers>,
  10. {},
  11. NewsQueryHelpers
  12. >;
  13. station: Schema<StationSchema>;
  14. };
  15. export type Models = {
  16. abc: Model<AbcSchema>;
  17. news: Model<NewsSchema, NewsQueryHelpers>;
  18. station: Model<StationSchema>;
  19. };