arnaucube
arnaucube/openworktimePublic Self-hosted repository
openworktime/models/projectModel.js
models/projectModel.jsRaw
 1var mongoose = require('mongoose'),
 2    Schema   = mongoose.Schema;
 3
 4
 5var projectSchema = new Schema({
 6    title: { type: String },
 7    description: { type: String },
 8    icon: { type: String },
 9    users: [{
10        username: { type: String },
11        time: { type: Number }
12     }],
13    chart: [{
14        labels: [{ type: String }],
15        series: [{ type: String }],
16        data: [{type: String }]
17    }],
18    workStrikes: [{
19        username: { type: String },
20        start: { type: Date },
21        end: { type: Date },
22        time: { type: Number }
23    }],
24    dateCreation: { type: Date },
25    github: { type: String },
26    refnum: { type: String }
27})
28module.exports = mongoose.model('projectModel', projectSchema);
29
30
31//modality can be: offering, asking, package