- cataloghi...

- fix: condividi su Telegram non funzionava errore sull'immagine
This commit is contained in:
Surya Paolo
2024-11-02 18:06:12 +01:00
parent 3bdab927b6
commit b7ffd751dc
12 changed files with 145 additions and 48 deletions

View File

@@ -13,24 +13,46 @@ mongoose.plugin(schema => {
schema.options.usePushEach = true
});
const ISize = new Schema({
width: { type: String },
height: { type: String },
});
const IBorders = new Schema({
top: { type: String },
bottom: { type: String },
left: { type: String },
right: { type: String },
})
const IDimensioni = new Schema({
size: ISize,
margini: IBorders,
padding: IBorders,
});
const IElementiScheda = new Schema({
pagina: IDimensioni,
riga: IDimensioni,
scheda_prodotto: IDimensioni,
immagine_prodotto: IDimensioni,
});
const scheletroScheda = {
idapp: {
type: String,
},
name: { type: String },
idapp: { type: String },
isTemplate: { type: Boolean },
widthpag: { type: Number },
width: { type: Number },
height: { type: Number },
widthscheda: { type: String },
name: { type: String },
line_height: { type: Number },
numschede_perRiga: { type: Number },
numschede_perCol: { type: Number },
margine_top: { type: Number },
margine_pagina: { type: String },
margine_riga: { type: String },
text: { type: String },
posiz_text: { type: Number },
line_height: { type: Number },
dimensioni: IElementiScheda,
bgimg: { type: String },
bgimg_printable: { type: String },
bgSize: { type: String },
bgSize_Printable: { type: String },
productTypes: [{ type: Number }],
excludeproductTypes: [{ type: Number }],
@@ -68,4 +90,4 @@ MyScheda.createIndexes((err) => {
if (err) throw err;
});
module.exports = { MyScheda, MySchedaSchema, scheletroScheda };
module.exports = { MyScheda, MySchedaSchema, IDimensioni };