mongodb model prop

master
Matthew 2022-03-01 13:34:28 -05:00
parent d7153603a1
commit fb51d14c51
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
6 changed files with 17 additions and 17 deletions

View File

@ -7,7 +7,7 @@ export default class Rank {
@prop({ required: true })
public roleID: string;
@prop({ required: true })
@prop({ default: [] })
public permissions: string[];
@prop()

View File

@ -7,6 +7,6 @@ export default class Redirect {
@prop({ required: true })
public to: string;
@prop({ required: true })
@prop()
public visitedCount: number;
}

View File

@ -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[];
}

View File

@ -17,7 +17,7 @@ export default class ScoreHistorical {
};
// error with Types.ObjectId[]
@prop({ required: true })
@prop({ default: [] })
public inquiries: Types.ObjectId[];
@prop({ required: true })

View File

@ -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[];
}

View File

@ -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. */