File size: 614 Bytes
073446b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import prisma from '../prismaClient.js';

async function main() {
  try {
    const products = await prisma.product.findMany({
      take: 5,
      select: {
        id: true,
        name: true,
        price: true,
        basePriceRMB: true,
        domesticShippingFee: true
      }
    });

    console.log('Current Data Sample:');
    products.forEach(p => {
      console.log(`ID: ${p.id} | Base (Cost): ${p.basePriceRMB} | Domestic: ${p.domesticShippingFee} | Price (Selling): ${p.price}`);
    });
  } catch (error) {
    console.error(error);
  } finally {
    await prisma.$disconnect();
  }
}

main();