2021-02-07 20:58:26 -05:00
|
|
|
import { Document, model, Schema } from 'mongoose';
|
|
|
|
|
|
|
|
export interface ResolutionInterface extends Document {
|
2021-03-01 16:35:36 -05:00
|
|
|
issuer: string;
|
2021-02-07 20:58:26 -05:00
|
|
|
subject: string;
|
|
|
|
body: string;
|
2021-03-04 23:04:47 -05:00
|
|
|
at: number;
|
2021-02-07 20:58:26 -05:00
|
|
|
oID: string;
|
2021-03-01 16:35:36 -05:00
|
|
|
results: {
|
2021-02-07 20:58:26 -05:00
|
|
|
yea: number;
|
|
|
|
nay: number;
|
|
|
|
present: number;
|
|
|
|
absent: number;
|
|
|
|
};
|
2021-03-04 20:19:17 -05:00
|
|
|
msg: string;
|
2021-02-07 20:58:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
const Resolution = new Schema({
|
2021-03-01 16:35:36 -05:00
|
|
|
issuer: { type: String, required: true },
|
2021-02-07 20:58:26 -05:00
|
|
|
subject: { type: String, required: true },
|
|
|
|
body: { type: String, required: true },
|
2021-03-04 23:04:47 -05:00
|
|
|
at: { type: Number, required: true },
|
2021-02-07 20:58:26 -05:00
|
|
|
oID: { type: String, required: true, unique: true },
|
2021-03-01 16:35:36 -05:00
|
|
|
results: {
|
2021-02-07 20:58:26 -05:00
|
|
|
yea: Number,
|
|
|
|
Nay: Number,
|
|
|
|
present: Number,
|
|
|
|
absent: Number,
|
|
|
|
},
|
2021-03-04 23:04:47 -05:00
|
|
|
msg: { type: String, required: true, unique: true },
|
2021-02-07 20:58:26 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
export default model<ResolutionInterface>('Resolutions', Resolution);
|