2020-07-06 03:15:06 -04:00
|
|
|
import { Document, Schema, model } from 'mongoose';
|
|
|
|
|
|
|
|
export interface PagerNumberRaw {
|
|
|
|
num: string,
|
|
|
|
// This field will be "" if the pager number doesn't belong to an individual user
|
|
|
|
individualAssignID: string,
|
|
|
|
emailAddresses: string[],
|
|
|
|
discordIDs: string[],
|
2020-08-23 23:27:38 -04:00
|
|
|
receiveEmail: boolean,
|
2020-11-30 19:51:20 -05:00
|
|
|
receivePhone: boolean,
|
2020-07-06 03:15:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface PagerNumberInterface extends Document {
|
|
|
|
num: string,
|
|
|
|
// This field will be "" if the pager number doesn't belong to an individual user
|
|
|
|
individualAssignID: string,
|
|
|
|
emailAddresses: string[],
|
|
|
|
discordIDs: string[],
|
2020-08-23 23:27:38 -04:00
|
|
|
receiveEmail: boolean,
|
2020-11-30 19:51:20 -05:00
|
|
|
receivePhone: boolean,
|
2020-07-06 03:15:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
const PagerNumber: Schema = new Schema({
|
|
|
|
num: String,
|
|
|
|
individualAssignID: String,
|
|
|
|
emailAddresses: Array,
|
|
|
|
discordIDs: Array,
|
2020-08-23 23:27:38 -04:00
|
|
|
receiveEmail: Boolean,
|
2020-11-30 19:51:20 -05:00
|
|
|
receivePhone: Boolean,
|
2020-07-06 03:15:06 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default model<PagerNumberInterface>('PagerNumber', PagerNumber);
|