project architecture added to the backend, post new projects, webapp interval syncronization

This commit is contained in:
nau
2016-09-07 23:29:59 +02:00
parent 4255875f84
commit 3df8ff8c70
7 changed files with 177 additions and 169 deletions

18
models/projectModel.js Normal file
View File

@@ -0,0 +1,18 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var travelSchema = new Schema({
title: { type: String },
description: { type: String },
icon: { type: String },
users: { type: String },
chart: { type: String },
dateCreation: { type: Date },
github: { type: String },
refnum: { type: String }
})
module.exports = mongoose.model('projectModel', travelSchema);
//modality can be: offering, asking, package

View File

@@ -1,25 +0,0 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var travelSchema = new Schema({
title: { type: String },
description: { type: String },
owner: { type: String },
from: { type: String },
to: { type: String },
date: { type: Date },
periodic: { type: Boolean },
generateddate: { type: Date },
seats: { type: Number },
package: { type: Boolean },
icon: { type: String },
phone: { type: Number },
telegram: { type: String },
collectivized: { type: Boolean },
modality: { type: String } //if is an offering travel or asking for travel
})
module.exports = mongoose.model('travelModel', travelSchema);
//modality can be: offering, asking, package