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;
|
|
|
|
at: Date;
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
acceptedAt: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
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 },
|
|
|
|
at: { type: Date, required: true },
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
acceptedAt: Number,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default model<ResolutionInterface>('Resolutions', Resolution);
|