import 'dotenv/config'; import { connectDatabase, disconnectDatabase, prisma } from '../config/database.js'; import { Logger } from '../utils/logger.js'; async function main() { try { await connectDatabase(); // Get a sample product with all fields const product = await prisma.product.findFirst({ select: { id: true, externalId: true, name: true, description: true, currentPrice: true, unit: true, weight: true, brand: true, categoryId: true, badges: true, } }); if (product) { Logger.info('=== ДЕТАЛИ ТОВАРА ИЗ БД ==='); Logger.info(JSON.stringify(product, null, 2)); } } catch (error) { Logger.error('❌ Ошибка:', error); process.exit(1); } finally { await disconnectDatabase(); } } main();