cr-database/models/PagerNumber.ts

33 lines
871 B
TypeScript
Raw Normal View History

2021-12-25 13:37:42 -05: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[],
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);