- Cataloghi aggiornamento...
This commit is contained in:
@@ -24,10 +24,6 @@ const CatalogSchema = new Schema({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
versione_perstampa: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
@@ -35,6 +31,9 @@ const CatalogSchema = new Schema({
|
||||
idCollane: [{
|
||||
type: Number,
|
||||
}],
|
||||
argomenti: [{
|
||||
type: String,
|
||||
}],
|
||||
editore: [{ type: String }],
|
||||
descr_introduttiva: {
|
||||
type: String,
|
||||
@@ -42,12 +41,17 @@ const CatalogSchema = new Schema({
|
||||
idPageAssigned: {
|
||||
type: String,
|
||||
},
|
||||
idPageAssigned_stampa: {
|
||||
type: String,
|
||||
},
|
||||
referenti: [{
|
||||
type: String,
|
||||
}],
|
||||
|
||||
img_bordata: IImg,
|
||||
img_intro: IImg,
|
||||
img_bordata_stampa: IImg,
|
||||
img_intro_stampa: IImg,
|
||||
pagina_introduttiva_sfondo_nero: {
|
||||
type: Boolean,
|
||||
},
|
||||
@@ -70,6 +74,8 @@ const CatalogSchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
/*
|
||||
TOLTO ALTRIMENTI su /settable non mi crea l'ID
|
||||
CatalogSchema.pre('save', async function (next) {
|
||||
if (this.isNew) {
|
||||
this._id = new ObjectId();
|
||||
@@ -77,6 +83,7 @@ CatalogSchema.pre('save', async function (next) {
|
||||
|
||||
next();
|
||||
});
|
||||
*/
|
||||
|
||||
CatalogSchema.statics.getFieldsForSearch = function () {
|
||||
return [{ field: 'title', type: tools.FieldType.string }]
|
||||
|
||||
Reference in New Issue
Block a user