diff --git a/mongodb/Rank.ts b/mongodb/Rank.ts index 880d347..18ead19 100644 --- a/mongodb/Rank.ts +++ b/mongodb/Rank.ts @@ -7,7 +7,7 @@ export default class Rank { @prop({ required: true }) public roleID: string; - @prop({ required: true }) + @prop({ default: [] }) public permissions: string[]; @prop() diff --git a/mongodb/Redirect.ts b/mongodb/Redirect.ts index 45acf74..afc4f1b 100644 --- a/mongodb/Redirect.ts +++ b/mongodb/Redirect.ts @@ -7,6 +7,6 @@ export default class Redirect { @prop({ required: true }) public to: string; - @prop({ required: true }) + @prop() public visitedCount: number; } diff --git a/mongodb/Score.ts b/mongodb/Score.ts index 70dd7a2..1e1e15f 100644 --- a/mongodb/Score.ts +++ b/mongodb/Score.ts @@ -44,18 +44,18 @@ export default class Score { @prop({ required: true }) public notify: boolean; - @prop({ required: true }) + @prop() public locked: boolean; - @prop({ required: true }) + @prop({ default: [] }) public inquiries: [Inquiry]; - @prop({ required: true }) + @prop({ default: [] }) public softInquiries: [{ name: string, date: Date }]; - @prop({ required: true }) + @prop() public lastUpdate: Date; - @prop({ required: true }) + @prop() public pin: number[]; } diff --git a/mongodb/ScoreHistorical.ts b/mongodb/ScoreHistorical.ts index 8fbf0df..e2c2702 100644 --- a/mongodb/ScoreHistorical.ts +++ b/mongodb/ScoreHistorical.ts @@ -17,7 +17,7 @@ export default class ScoreHistorical { }; // error with Types.ObjectId[] - @prop({ required: true }) + @prop({ default: [] }) public inquiries: Types.ObjectId[]; @prop({ required: true }) diff --git a/mongodb/Staff.ts b/mongodb/Staff.ts index 57e2a01..ec261f1 100644 --- a/mongodb/Staff.ts +++ b/mongodb/Staff.ts @@ -1,30 +1,30 @@ import { prop } from '@typegoose/typegoose'; export default class Staff { - @prop({ required: true }) + @prop() public name: string; @prop({ required: true }) public userID: string; - @prop({ required: true }) + @prop() public title: string; - @prop({ required: true }) + @prop() public dept: string; - @prop({ required: true }) + @prop() public pn: string[]; - @prop({ required: true }) + @prop() public emailAddress: string; - @prop({ required: true }) + @prop() public extension: string; - @prop({ required: true }) + @prop() public acknowledgements: string[]; - @prop({ required: true }) + @prop() public additionalRoles: string[]; } diff --git a/tsconfig.json b/tsconfig.json index 7babca6..d1df02e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": false, /* Generates corresponding '.d.ts' file. */ + "declaration": false, /* Generates corresponding '.d.ts' file. */ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ // "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */