mirror of
https://github.com/arnaucube/openworktime.git
synced 2026-02-07 11:46:40 +01:00
html structure
This commit is contained in:
25
models/travelModel.js
Normal file
25
models/travelModel.js
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
14
models/userModel.js
Normal file
14
models/userModel.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var mongoose = require('mongoose'),
|
||||
Schema = mongoose.Schema;
|
||||
|
||||
|
||||
var userSchema = new Schema({
|
||||
username: { type: String },
|
||||
password: { type: String },
|
||||
description: { type: String },
|
||||
avatar: { type: String },
|
||||
mail: { type: String },
|
||||
phone: { type: String },
|
||||
telegram: { type: String }
|
||||
})
|
||||
module.exports = mongoose.model('userModel', userSchema);
|
||||
Reference in New Issue
Block a user