import { Document, Schema, model, Types } from 'mongoose';
import { ScoreInterfaceRaw } from '.';

export interface ScoreHistoricalRaw {
  userID: string,
  report: ScoreInterfaceRaw,
  inquiries: [ Types.ObjectId ],
  date: Date,
}

export interface ScoreHistoricalInterface extends Document {
  userID: string,
  report: ScoreInterfaceRaw,
  inquiries: [ Types.ObjectId ],
  date: Date
}

const ScoreHistorical: Schema = new Schema({
  userID: String,
  report: Object,
  inquiries: Array,
  date: Date,
});

export default model<ScoreHistoricalInterface>('ScoreHistorical', ScoreHistorical);
