From 341fd026d436326931f1dcc0dcc01f57d0462424 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 28 Feb 2022 12:57:43 -0500 Subject: [PATCH] fixes --- index.ts | 30 ++++++++++++++++++- {mongodb-models => mongodb}/Customer.ts | 1 + {mongodb-models => mongodb}/CustomerPortal.ts | 2 +- {mongodb-models => mongodb}/ExecutiveOrder.ts | 1 + {mongodb-models => mongodb}/File.ts | 1 - {mongodb-models => mongodb}/Inquiry.ts | 0 {mongodb-models => mongodb}/Judgement.ts | 0 {mongodb-models => mongodb}/Member.ts | 0 {mongodb-models => mongodb}/Merchant.ts | 0 {mongodb-models => mongodb}/Moderation.ts | 0 {mongodb-models => mongodb}/Motion.ts | 0 {mongodb-models => mongodb}/Note.ts | 0 {mongodb-models => mongodb}/PagerNumber.ts | 0 {mongodb-models => mongodb}/Proclamation.ts | 0 {mongodb-models => mongodb}/Promo.ts | 0 {mongodb-models => mongodb}/Rank.ts | 0 {mongodb-models => mongodb}/Redirect.ts | 0 {mongodb-models => mongodb}/Resolution.ts | 0 {mongodb-models => mongodb}/SAA.ts | 0 {mongodb-models => mongodb}/Score.ts | 0 .../ScoreHistorical.ts | 0 {mongodb-models => mongodb}/Staff.ts | 0 {mongodb-models => mongodb}/Stat.ts | 0 {mongodb-models => mongodb}/index.ts | 0 24 files changed, 32 insertions(+), 3 deletions(-) rename {mongodb-models => mongodb}/Customer.ts (99%) rename {mongodb-models => mongodb}/CustomerPortal.ts (84%) rename {mongodb-models => mongodb}/ExecutiveOrder.ts (99%) rename {mongodb-models => mongodb}/File.ts (99%) rename {mongodb-models => mongodb}/Inquiry.ts (100%) rename {mongodb-models => mongodb}/Judgement.ts (100%) rename {mongodb-models => mongodb}/Member.ts (100%) rename {mongodb-models => mongodb}/Merchant.ts (100%) rename {mongodb-models => mongodb}/Moderation.ts (100%) rename {mongodb-models => mongodb}/Motion.ts (100%) rename {mongodb-models => mongodb}/Note.ts (100%) rename {mongodb-models => mongodb}/PagerNumber.ts (100%) rename {mongodb-models => mongodb}/Proclamation.ts (100%) rename {mongodb-models => mongodb}/Promo.ts (100%) rename {mongodb-models => mongodb}/Rank.ts (100%) rename {mongodb-models => mongodb}/Redirect.ts (100%) rename {mongodb-models => mongodb}/Resolution.ts (100%) rename {mongodb-models => mongodb}/SAA.ts (100%) rename {mongodb-models => mongodb}/Score.ts (100%) rename {mongodb-models => mongodb}/ScoreHistorical.ts (100%) rename {mongodb-models => mongodb}/Staff.ts (100%) rename {mongodb-models => mongodb}/Stat.ts (100%) rename {mongodb-models => mongodb}/index.ts (100%) diff --git a/index.ts b/index.ts index 4048b82..4821c58 100644 --- a/index.ts +++ b/index.ts @@ -1 +1,29 @@ -export * as MongoDBModels from './mongodb-models'; +import { getModelForClass as gm } from '@typegoose/typegoose'; +import * as MongoDB from './mongodb'; + +export default { + MongoDBModels: { + Customer: gm(MongoDB.Customer), + CustomerPortal: gm(MongoDB.CustomerPortal), + ExecutiveOrder: gm(MongoDB.ExecutiveOrder), + File: gm(MongoDB.File), + Inquiry: gm(MongoDB.Inquiry), + Judgement: gm(MongoDB.Judgement), + Member: gm(MongoDB.Member), + Merchant: gm(MongoDB.Merchant), + Moderation: gm(MongoDB.Moderation), + Motion: gm(MongoDB.Motion), + Note: gm(MongoDB.Note), + PagerNumber: gm(MongoDB.PagerNumber), + Proclamation: gm(MongoDB.Proclamation), + Promo: gm(MongoDB.Promo), + Rank: gm(MongoDB.Rank), + Redirect: gm(MongoDB.Resolution), + Resolution: gm(MongoDB.Resolution), + SAA: gm(MongoDB.SAA), + Score: gm(MongoDB.Score), + ScoreHistorial: gm(MongoDB.ScoreHistorical), + Staff: gm(MongoDB.Staff), + Stat: gm(MongoDB.Stat), + } +} diff --git a/mongodb-models/Customer.ts b/mongodb/Customer.ts similarity index 99% rename from mongodb-models/Customer.ts rename to mongodb/Customer.ts index 924fe6b..7534f27 100644 --- a/mongodb-models/Customer.ts +++ b/mongodb/Customer.ts @@ -7,3 +7,4 @@ export default class Customer { @prop({ required: true }) public userID: string; } + diff --git a/mongodb-models/CustomerPortal.ts b/mongodb/CustomerPortal.ts similarity index 84% rename from mongodb-models/CustomerPortal.ts rename to mongodb/CustomerPortal.ts index 309597f..2feb5be 100644 --- a/mongodb-models/CustomerPortal.ts +++ b/mongodb/CustomerPortal.ts @@ -1,4 +1,4 @@ -import { prop } from '@typegoose/typegoose'; +import { prop, getModelForClass } from '@typegoose/typegoose'; export default class CustomerPortal { @prop({ required: true }) diff --git a/mongodb-models/ExecutiveOrder.ts b/mongodb/ExecutiveOrder.ts similarity index 99% rename from mongodb-models/ExecutiveOrder.ts rename to mongodb/ExecutiveOrder.ts index 7cefc42..f5ec515 100644 --- a/mongodb-models/ExecutiveOrder.ts +++ b/mongodb/ExecutiveOrder.ts @@ -19,3 +19,4 @@ export default class ExecutiveOrder { @prop({ required: true, unique: true }) public msg: string; } + diff --git a/mongodb-models/File.ts b/mongodb/File.ts similarity index 99% rename from mongodb-models/File.ts rename to mongodb/File.ts index dc90a12..ffd7cd3 100644 --- a/mongodb-models/File.ts +++ b/mongodb/File.ts @@ -1,5 +1,4 @@ import { prop } from '@typegoose/typegoose'; - export default class File { @prop({ required: true }) public name: string; diff --git a/mongodb-models/Inquiry.ts b/mongodb/Inquiry.ts similarity index 100% rename from mongodb-models/Inquiry.ts rename to mongodb/Inquiry.ts diff --git a/mongodb-models/Judgement.ts b/mongodb/Judgement.ts similarity index 100% rename from mongodb-models/Judgement.ts rename to mongodb/Judgement.ts diff --git a/mongodb-models/Member.ts b/mongodb/Member.ts similarity index 100% rename from mongodb-models/Member.ts rename to mongodb/Member.ts diff --git a/mongodb-models/Merchant.ts b/mongodb/Merchant.ts similarity index 100% rename from mongodb-models/Merchant.ts rename to mongodb/Merchant.ts diff --git a/mongodb-models/Moderation.ts b/mongodb/Moderation.ts similarity index 100% rename from mongodb-models/Moderation.ts rename to mongodb/Moderation.ts diff --git a/mongodb-models/Motion.ts b/mongodb/Motion.ts similarity index 100% rename from mongodb-models/Motion.ts rename to mongodb/Motion.ts diff --git a/mongodb-models/Note.ts b/mongodb/Note.ts similarity index 100% rename from mongodb-models/Note.ts rename to mongodb/Note.ts diff --git a/mongodb-models/PagerNumber.ts b/mongodb/PagerNumber.ts similarity index 100% rename from mongodb-models/PagerNumber.ts rename to mongodb/PagerNumber.ts diff --git a/mongodb-models/Proclamation.ts b/mongodb/Proclamation.ts similarity index 100% rename from mongodb-models/Proclamation.ts rename to mongodb/Proclamation.ts diff --git a/mongodb-models/Promo.ts b/mongodb/Promo.ts similarity index 100% rename from mongodb-models/Promo.ts rename to mongodb/Promo.ts diff --git a/mongodb-models/Rank.ts b/mongodb/Rank.ts similarity index 100% rename from mongodb-models/Rank.ts rename to mongodb/Rank.ts diff --git a/mongodb-models/Redirect.ts b/mongodb/Redirect.ts similarity index 100% rename from mongodb-models/Redirect.ts rename to mongodb/Redirect.ts diff --git a/mongodb-models/Resolution.ts b/mongodb/Resolution.ts similarity index 100% rename from mongodb-models/Resolution.ts rename to mongodb/Resolution.ts diff --git a/mongodb-models/SAA.ts b/mongodb/SAA.ts similarity index 100% rename from mongodb-models/SAA.ts rename to mongodb/SAA.ts diff --git a/mongodb-models/Score.ts b/mongodb/Score.ts similarity index 100% rename from mongodb-models/Score.ts rename to mongodb/Score.ts diff --git a/mongodb-models/ScoreHistorical.ts b/mongodb/ScoreHistorical.ts similarity index 100% rename from mongodb-models/ScoreHistorical.ts rename to mongodb/ScoreHistorical.ts diff --git a/mongodb-models/Staff.ts b/mongodb/Staff.ts similarity index 100% rename from mongodb-models/Staff.ts rename to mongodb/Staff.ts diff --git a/mongodb-models/Stat.ts b/mongodb/Stat.ts similarity index 100% rename from mongodb-models/Stat.ts rename to mongodb/Stat.ts diff --git a/mongodb-models/index.ts b/mongodb/index.ts similarity index 100% rename from mongodb-models/index.ts rename to mongodb/index.ts