mongodb model prop
parent
d7153603a1
commit
fb51d14c51
|
@ -7,7 +7,7 @@ export default class Rank {
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
public roleID: string;
|
public roleID: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop({ default: [] })
|
||||||
public permissions: string[];
|
public permissions: string[];
|
||||||
|
|
||||||
@prop()
|
@prop()
|
||||||
|
|
|
@ -7,6 +7,6 @@ export default class Redirect {
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
public to: string;
|
public to: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public visitedCount: number;
|
public visitedCount: number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,18 +44,18 @@ export default class Score {
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
public notify: boolean;
|
public notify: boolean;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public locked: boolean;
|
public locked: boolean;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop({ default: [] })
|
||||||
public inquiries: [Inquiry];
|
public inquiries: [Inquiry];
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop({ default: [] })
|
||||||
public softInquiries: [{ name: string, date: Date }];
|
public softInquiries: [{ name: string, date: Date }];
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public lastUpdate: Date;
|
public lastUpdate: Date;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public pin: number[];
|
public pin: number[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default class ScoreHistorical {
|
||||||
};
|
};
|
||||||
|
|
||||||
// error with Types.ObjectId[]
|
// error with Types.ObjectId[]
|
||||||
@prop({ required: true })
|
@prop({ default: [] })
|
||||||
public inquiries: Types.ObjectId[];
|
public inquiries: Types.ObjectId[];
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
import { prop } from '@typegoose/typegoose';
|
import { prop } from '@typegoose/typegoose';
|
||||||
|
|
||||||
export default class Staff {
|
export default class Staff {
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
public userID: string;
|
public userID: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public title: string;
|
public title: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public dept: string;
|
public dept: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public pn: string[];
|
public pn: string[];
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public emailAddress: string;
|
public emailAddress: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public extension: string;
|
public extension: string;
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public acknowledgements: string[];
|
public acknowledgements: string[];
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop()
|
||||||
public additionalRoles: string[];
|
public additionalRoles: string[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
// "checkJs": true, /* Report errors in .js files. */
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
// "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. */
|
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||||
|
|
Loading…
Reference in New Issue