Iscrizione Conacreis e Arcadei
This commit is contained in:
@@ -17,7 +17,7 @@ const MyElemSchema = new Schema({
|
||||
type: String,
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
type: Number,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
@@ -25,6 +25,24 @@ const MyElemSchema = new Schema({
|
||||
container: {
|
||||
type: String,
|
||||
},
|
||||
container2: {
|
||||
type: String,
|
||||
},
|
||||
container3: {
|
||||
type: String,
|
||||
},
|
||||
number: {
|
||||
type: String,
|
||||
},
|
||||
imgback: {
|
||||
type: String,
|
||||
},
|
||||
ratio: {
|
||||
type: String,
|
||||
},
|
||||
containerHtml: {
|
||||
type: String,
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
},
|
||||
@@ -35,6 +53,18 @@ const MyElemSchema = new Schema({
|
||||
height: {
|
||||
type: Number,
|
||||
},
|
||||
heightimg: {
|
||||
type: Number,
|
||||
},
|
||||
widthimg: {
|
||||
type: Number,
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
},
|
||||
link: {
|
||||
type: String,
|
||||
},
|
||||
onlyif_logged: {
|
||||
type: Boolean,
|
||||
},
|
||||
@@ -47,6 +77,25 @@ const MyElemSchema = new Schema({
|
||||
class: {
|
||||
type: String,
|
||||
},
|
||||
styleadd: {
|
||||
type: String,
|
||||
},
|
||||
list: [
|
||||
{
|
||||
imagefile: {
|
||||
type: String
|
||||
},
|
||||
order: {
|
||||
type: Number
|
||||
},
|
||||
alt: {
|
||||
type: String
|
||||
},
|
||||
description: {
|
||||
type: String
|
||||
}
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
MyElemSchema.statics.getFieldsForSearch = function () {
|
||||
@@ -64,9 +113,7 @@ MyElemSchema.statics.findAllIdApp = async function (idapp) {
|
||||
|
||||
const myfind = { idapp };
|
||||
|
||||
return await MyElem.find(myfind, (err, arrrec) => {
|
||||
return arrrec
|
||||
});
|
||||
return await MyElem.find(myfind).sort({ order: 1 });
|
||||
};
|
||||
|
||||
const MyElem = mongoose.model('MyElem', MyElemSchema);
|
||||
|
||||
Reference in New Issue
Block a user