const mongoose = require('mongoose')

const SurveySchema = mongoose.Schema({
  purchasedProduct: { type: Number, enum: [1, 2, 3, 4, 5] },
  guaranteeWorkFlow: { type: Number, enum: [1, 2, 3, 4, 5] },
  employeeResponsibility: { type: Number, enum: [1, 2, 3, 4, 5] },
  serviceQuality: { type: Number, enum: [1, 2, 3, 4, 5] },
  serviceTime: { type: Number, enum: [1, 2, 3, 4, 5] },
  repairQuality: { type: Number, enum: [1, 2, 3, 4, 5] },
  coast: { type: Number, enum: [1, 2, 3, 4, 5] },
  description: String,
  code: String,
  fullName: String,
  national: String,
  phoneNumber: String,
  email: String,
  type: {
    type: Number,
    default: 0
  },
  user: { type: mongoose.ObjectId, ref: 'User' },
})

module.exports = mongoose.model('Survey', SurveySchema)
