'use strict';

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

/**
 * Car Schema
 */
var CarSchema = new Schema({
	name: {
		type: String,
		default: '',
		required: 'Please fill Car name',
		trim: true
	},
	tech_id: {
		type: String,
		required: 'Please fill Technician ID',
		trim: true
	},
	tech_fullname: {
		type: String,
		default: '',
		required: 'Please fill Technician Name',
		trim: true
	},
	tech_signdate: {
		type: Date,
		default: Date.now
	},
	tech_is_resign: {
		type: Boolean,
		default: false
	},
	tech_resigndate: {
		type: Date,
		default: Date.now
	},
	tech_holiday: {
		type: Number,
		default: 0,
		required: 'Please fill Technician Holiday'
	},
	//Station Number: 0, 1, 2, 3, and so on..
	tech_main_station: {
		type: Number,
		required: 'Please fill Technician Main Station'
	},

	tech_exholidays: [
			{
				start:Date,
				end:Date
			}
	],
	tech_skills: [
			{
				skill_id: String
			}
	],

	created: {
		type: Date,
		default: Date.now
	},
	user: {
		type: Schema.ObjectId,
		ref: 'User'
	}
});

mongoose.model('Car', CarSchema);
@@ -252,721 +252,8 @@
 %09%7D,%0A
-%09tech_id: %7B%0A%09%09type: String,%0A%09%09required: 'Please fill Technician ID',%0A%09%09trim: true%0A%09%7D,%0A%09tech_fullname: %7B%0A%09%09type: String,%0A%09%09default: '',%0A%09%09required: 'Please fill Technician Name',%0A%09%09trim: true%0A%09%7D,%0A%09tech_signdate: %7B%0A%09%09type: Date,%0A%09%09default: Date.now%0A%09%7D,%0A%09tech_is_resign: %7B%0A%09%09type: Boolean,%0A%09%09default: false%0A%09%7D,%0A%09tech_resigndate: %7B%0A%09%09type: Date,%0A%09%09default: Date.now%0A%09%7D,%0A%09tech_holiday: %7B%0A%09%09type: Number,%0A%09%09default: 0,%0A%09%09required: 'Please fill Technician Holiday'%0A%09%7D,%0A%09//Station Number: 0, 1, 2, 3, and so on..%0A%09tech_main_station: %7B%0A%09%09type: Number,%0A%09%09required: 'Please fill Technician Main Station'%0A%09%7D,%0A%0A%09tech_exholidays: %5B%0A%09%09%09%7B%0A%09%09%09%09start:Date,%0A%09%09%09%09end:Date%0A%09%09%09%7D%0A%09%5D,%0A%09tech_skills: %5B%0A%09%09%09%7B%0A%09%09%09%09skill_id: String%0A%09%09%09%7D%0A%09%5D,%0A%0A
 %09cre

fix car model bug