cr-database/models/ScoreHistorical.ts

43 lines
940 B
TypeScript
Raw Normal View History

2021-12-25 13:37:42 -05:00
import { Document, Schema, model, Types } from 'mongoose';
export interface ScoreHistoricalRaw {
userID: string,
report: {
total: number,
activity: number,
roles: number,
moderation: number,
cloudServices: number,
staff: number,
other: number,
},
// inquiries: [ Types.ObjectId ],
inquiries: Types.ObjectId[],
date: Date,
}
export interface ScoreHistoricalInterface extends Document {
userID: string,
report: {
total: number,
activity: number,
roles: number,
moderation: number,
cloudServices: number,
staff: number,
other: number,
},
// inquiries: [ Types.ObjectId ],
inquiries: Types.ObjectId[],
date: Date
}
const ScoreHistorical: Schema = new Schema({
userID: String,
report: Object,
inquiries: Array,
date: Date,
});
export default model<ScoreHistoricalInterface>('ScoreHistorical', ScoreHistorical);