var mongoose = require("mongoose");
var Schema = mongoose.Schema;

var userSchema = new Schema({
	username: {
		type: String,
		required: true,
	},
	email: {
		type: String,
		required: true,
	},
	password: {
		type: String,
		required: true,
	},
	roles: {
		type: mongoose.Schema.Types.ObjectId,
		ref: "Role",
	},
	group: {
		type: String,
		required: true,
	},
	preference_holiday: {
		type: Boolean,
		required: true,
	},
	preference_adjacent: {
		type: Boolean,
		required: true,
	},
});

module.exports = mongoose.model("employee", userSchema);
