17 lines
567 B
JavaScript
17 lines
567 B
JavaScript
import { PrismaClient } from '@prisma/client';
|
|
const prisma = new PrismaClient();
|
|
prisma.product.findMany({
|
|
include: {
|
|
category: { include: { translations: true } },
|
|
brand: true,
|
|
translations: true,
|
|
variants: {
|
|
include: {
|
|
bomItems: { include: { rawMaterial: true } }
|
|
},
|
|
orderBy: { price: "asc" }
|
|
},
|
|
images: { orderBy: { order: "asc" } },
|
|
}
|
|
}).then(console.log).catch(console.error).finally(() => prisma.$disconnect());
|
|
//# sourceMappingURL=scratch_test.js.map
|