33 lines
871 B
TypeScript
33 lines
871 B
TypeScript
|
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[],
|
||
|
receiveEmail: boolean,
|
||
|
receivePhone: boolean,
|
||
|
}
|
||
|
|
||
|
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[],
|
||
|
receiveEmail: boolean,
|
||
|
receivePhone: boolean,
|
||
|
}
|
||
|
|
||
|
const PagerNumber: Schema = new Schema({
|
||
|
num: String,
|
||
|
individualAssignID: String,
|
||
|
emailAddresses: Array,
|
||
|
discordIDs: Array,
|
||
|
receiveEmail: Boolean,
|
||
|
receivePhone: Boolean,
|
||
|
});
|
||
|
|
||
|
export default model<PagerNumberInterface>('PagerNumber', PagerNumber);
|