'use strict'

const mongoose = require('mongoose')
const Schema = mongoose.Schema

const skillSchema = new Schema({
  slug: {
    type: String,
    trim: true,
    index: true,
    unique: true,
    required: true,
    lowercase: true
  },
  name: {
    type: String,
    trim: true,
    required: true,
    index: true,
    unique: true
  },
  category: {
    type: Schema.Types.ObjectId,
    ref: 'SkillCategory'
  }
})

module.exports = mongoose.model('Skill', skillSchema)
