const { PrismaClient } = require('@prisma/client'); const prisma = new PrismaClient(); async function main() { const products = await prisma.product.findMany({ where: { slug: { in: ['awd-t-shirt-at001', 'awd-hoodie'] } }, select: { 'slug': true, 'name': true, 'imageUrl': true, 'imageUrlBack': true, 'colorPhotos': true, 'colorPhotosBack': true, 'printArea': true, 'printAreaBack': true } }); products.forEach(p => { console.log(`\n${p.name} (${p.slug}):`); console.log(` Base Images: front=${!!p.imageUrl}, back=${!!p.imageUrlBack}`); const colorPhotos = p.colorPhotos ? JSON.parse(p.colorPhotos) : {}; const colorPhotosBack = p.colorPhotosBack ? JSON.parse(p.colorPhotosBack) : {}; console.log(` Color Photos: front=${Object.keys(colorPhotos).length}, back=${Object.keys(colorPhotosBack).length}`); console.log(` Print Areas: front=${!!p.printArea}, back=${!!p.printAreaBack}`); }); } main() .then(() => process.exit(0)) .catch(err => { console.error(err); process.exit(1); });