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

export enum InqType {
  HARD,
  SOFT,
}

export interface InquiryInterface extends Document {
  iid?: string,
  userID: string,
  /**
   * - 0: Hard
   * - 1: Soft
   */
  type: InqType,
  name: string,
  reason?: string,
  date: Date,
  report?: ScoreInterfaceRaw,
}

const Inquiry: Schema = new Schema({
  iid: String,
  userID: String,
  type: Number,
  name: String,
  reason: String,
  date: String,
  report: Object,
});

export default model<InquiryInterface>('Inquiry', Inquiry);
