pomodoro/server/services/pomodoros/model.js
Linus Miller 47ce0a2a33 Huge commit
- Update all deps
 - Apply midwest changes
 - Convert all templates to JSX
 - Preact instead of Marko
 - Babel & Eslint
2016-11-10 14:34:44 +01:00

32 lines
514 B
JavaScript

'use strict';
const mongoose = require('mongoose');
const PomodoroSchema = new mongoose.Schema({
startTime: {
type: Date,
required: true,
},
endTime: {
type: Date,
required: true,
},
name: String,
location: String,
user: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
required: true,
},
ip: {
type: String,
required: true,
},
userAgent: {
type: String,
required: true,
},
});
module.exports = mongoose.model('Pomodoro', PomodoroSchema);