- Cataloghi: pagine, schede, formato

This commit is contained in:
Surya Paolo
2024-11-19 19:18:54 +01:00
parent 73cf977754
commit b1b952d120
16 changed files with 74 additions and 54 deletions

View File

@@ -4,7 +4,7 @@ const Schema = mongoose.Schema;
const tools = require('../tools/general');
const { ObjectID, ObjectId } = require('mongodb');
const { MySchedaSchema, IDimensioni } = require('../models/myscheda');
const { MySchedaSchema, IDimensioni, IImg } = require('../models/myscheda');
mongoose.Promise = global.Promise;
mongoose.level = "F";
@@ -15,6 +15,10 @@ mongoose.plugin(schema => {
schema.options.usePushEach = true
});
const IElementiPagina = new Schema({
pagina: IDimensioni,
});
const myCard = new Schema(
{
imagefile: String,
@@ -48,13 +52,6 @@ const elemText = new Schema(
}
);
const IElementiPagina = new Schema(
{
pagina: IDimensioni,
riga: IDimensioni,
}
);
const catalogo = new Schema(
{
@@ -63,9 +60,8 @@ const catalogo = new Schema(
excludeproductTypes: [{ type: Number }],
Editore: [{ type: String }],
pdf: { type: Boolean },
pdf_filename: { type: String },
printable: { type: Boolean },
width: { type: String },
height: { type: String },
first_page_img: { type: String },
first_page_html: { type: String },
@@ -76,17 +72,10 @@ const catalogo = new Schema(
last_page_height: { type: Number },
last_page_width: { type: Number },
margine_pagina: { type: String },
margine_riga: { type: String },
margine_paginaPrintable: { type: String },
margine_rigaPrintable: { type: String },
imgsfondo_def: IImg,
dimensioni_def: IElementiPagina,
backgroundimage: { type: String },
backgroundimage_printable: { type: String },
backgroundSize: { type: String },
backgroundSize_printable: { type: String },
widthpagPrintable: { type: Number },
// -------------------
arrSchede: [
{