This commit is contained in:
Dobie Wollert
2015-12-16 09:12:35 -08:00
parent f9c9672818
commit f94ca33b9e
805 changed files with 67409 additions and 24609 deletions

View File

@ -0,0 +1,30 @@
"use strict";
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
const EXCEPTION_REASONS = [
'late_to_first_workorder',
'too_little_travel',
'too_much_travel'
];
var schema = new Schema({
user: {
type: ObjectId,
ref: 'User',
required: true
},
date: {
type: Date,
required: true
},
reason: {
type: String,
enum: EXCEPTION_REASONS,
required: true
}
});
module.exports = mongoose.model('TimeClockException', schema);