- ordinamento per Data
This commit is contained in:
@@ -49,9 +49,9 @@ const catalogo = new Schema(
|
||||
//++AddCATALOGO_FIELDS
|
||||
productTypes: [{ type: Number }],
|
||||
excludeproductTypes: [{ type: Number }],
|
||||
Editore: [{ type: String }],
|
||||
// formato: [{ type: String, default: '' }],
|
||||
// categoria: [{ type: String, default: '' }],
|
||||
// Editore: [{ type: String, default: '' }],
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ const productSchema = new Schema({
|
||||
active: {
|
||||
type: Boolean,
|
||||
},
|
||||
arrversioni: [{
|
||||
versione: {
|
||||
type: Number,
|
||||
}],
|
||||
},
|
||||
status: { //publish
|
||||
type: String,
|
||||
},
|
||||
@@ -500,6 +500,20 @@ module.exports.findAllIdApp = async function (idapp, code, id, all) {
|
||||
as: 'productInfo.authors'
|
||||
}
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'publishers',
|
||||
localField: 'productInfo.idPublisher',
|
||||
foreignField: '_id',
|
||||
as: 'productInfo.publisher'
|
||||
}
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: '$productInfo.publisher',
|
||||
preserveNullAndEmptyArrays: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'catprods',
|
||||
|
||||
@@ -117,6 +117,9 @@ const productInfoSchema = new Schema({
|
||||
date_publishing: {
|
||||
type: Date,
|
||||
},
|
||||
date_publishing_ts: {
|
||||
type: Number,
|
||||
},
|
||||
productTypes: [{
|
||||
type: Number,
|
||||
}],
|
||||
|
||||
Reference in New Issue
Block a user