'use strict';
/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
  Schema = mongoose.Schema;

/**
 * FeatureMapper Schema
 */
var FeatureMapperSchema = new Schema({
  creation_date: {
    type: Date,
    default: Date.now
  },
  user: {
    type: Schema.ObjectId,
    ref: 'User'
  },
  address: {
    common_name: {
      type: String,
      default: '',
      trim: true,
      uppercase: true
    },
    street1: {
      type: String,
      default: '',
      trim: true,
      uppercase: true
    },
    street2: {
      type: String,
      default: '',
      trim: true,
      uppercase: true
    },
    floor: {
      type: String,
      default: '',
      trim: true
    },
    section: {
      type: String,
      default: '',
      trim: true
    },
    city: {
      type: String,
      default: '',
      trim: true,
      uppercase: true
    },
    state: {
      type: String,
      default: '',
      trim: true,
      uppercase: true
    },
    postal_code: {
      type: String,
      default: '',
      trim: true
    },
    country: {
      type: String,
      default: '',
      trim: true,
      uppercase: true
    }
  },
  aic_version: {
    type: String,
    default: '',
    trim: true
  },
  clli: {
    type: String,
    default: '',
    trim: true,
    uppercase: true
  },
  cluster: {
    type: String,
    default: '',
    trim: true,
    uppercase: true
  },
  compute_features:[String],
  contrail_version: {
    type: String,
    default: '',
    trim: true
  },
  date_start: {
    type: String,
    default: '',
    trim: true
  },
  date_end: {
    type: String,
    default: '',
    trim: true
  },
  myLogins_access: {
    type: String,
    default: '',
    trim: true
  },
  networks:[String],
  placement_exception:{
    type: String,
    default: '',
    trim: true
  },
  placement_waiver:{
    type: String,
    default: '',
    trim: true
  },
  site_description: {
    type: String,
    default: '',
    trim: true
  },
  site_type: {
    type: String,
    default: '',
    trim: true
  },
  storages: [String],
  support_models: [String],
  tools:[String],
  workloads: [String],
  zone: {
    type: String,
    default: '',
    trim: true,
    uppercase: true
  }          
});

mongoose.model('FeatureMapper', FeatureMapperSchema);
