Mise à jour de models 'Mongo'
This commit is contained in:
@@ -12,6 +12,7 @@ var JumpSchema = new mongoose.Schema({
|
|||||||
aeronef: String,
|
aeronef: String,
|
||||||
imat: String,
|
imat: String,
|
||||||
hauteur: Number,
|
hauteur: Number,
|
||||||
|
deploiement: Number,
|
||||||
voile: String,
|
voile: String,
|
||||||
taille: Number,
|
taille: Number,
|
||||||
categorie: String,
|
categorie: String,
|
||||||
@@ -49,6 +50,7 @@ JumpSchema.methods.toJSONFor = function(user){
|
|||||||
aeronef: this.aeronef,
|
aeronef: this.aeronef,
|
||||||
imat: this.imat,
|
imat: this.imat,
|
||||||
hauteur: this.hauteur,
|
hauteur: this.hauteur,
|
||||||
|
deploiement: this.deploiement,
|
||||||
voile: this.voile,
|
voile: this.voile,
|
||||||
taille: this.taille,
|
taille: this.taille,
|
||||||
categorie: this.categorie,
|
categorie: this.categorie,
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ var UserSchema = new mongoose.Schema({
|
|||||||
lastname: { type: String, required: [true, "can't be blank"] },
|
lastname: { type: String, required: [true, "can't be blank"] },
|
||||||
phone: { type: String, required: [true, "can't be blank"] },
|
phone: { type: String, required: [true, "can't be blank"] },
|
||||||
licence: Number,
|
licence: Number,
|
||||||
|
poids: Number,
|
||||||
image: String,
|
image: String,
|
||||||
bg_image: String,
|
bg_image: String,
|
||||||
favorites: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Product' }],
|
favorites: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Product' }],
|
||||||
@@ -53,6 +54,7 @@ UserSchema.methods.toAuthJSON = function () {
|
|||||||
lastname: this.lastname,
|
lastname: this.lastname,
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
licence: this.licence,
|
licence: this.licence,
|
||||||
|
poids: this.poids,
|
||||||
username: this.username,
|
username: this.username,
|
||||||
image: this.image || '/assets/images/users/user.jpg',
|
image: this.image || '/assets/images/users/user.jpg',
|
||||||
bg_image: this.bg_image || '/assets/images/users/bg_user.jpg'
|
bg_image: this.bg_image || '/assets/images/users/bg_user.jpg'
|
||||||
@@ -67,6 +69,7 @@ UserSchema.methods.toJSONFor = function () {
|
|||||||
lastname: this.lastname,
|
lastname: this.lastname,
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
licence: this.licence,
|
licence: this.licence,
|
||||||
|
poids: this.poids,
|
||||||
username: this.username,
|
username: this.username,
|
||||||
image: this.image || '/assets/images/users/user.jpg',
|
image: this.image || '/assets/images/users/user.jpg',
|
||||||
bg_image: this.bg_image || '/assets/images/users/bg_user.jpg'
|
bg_image: this.bg_image || '/assets/images/users/bg_user.jpg'
|
||||||
@@ -80,6 +83,7 @@ UserSchema.methods.toProfileJSONFor = function (user) {
|
|||||||
lastname: this.lastname,
|
lastname: this.lastname,
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
licence: this.licence,
|
licence: this.licence,
|
||||||
|
poids: this.poids,
|
||||||
username: this.username,
|
username: this.username,
|
||||||
image: this.image || '/assets/images/users/user.jpg',
|
image: this.image || '/assets/images/users/user.jpg',
|
||||||
bg_image: this.bg_image || '/assets/images/users/bg_user.jpg',
|
bg_image: this.bg_image || '/assets/images/users/bg_user.jpg',
|
||||||
|
|||||||
Reference in New Issue
Block a user