fix: error use select and include together
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s
This commit is contained in:
parent
3a437d78d4
commit
8abca9b137
1 changed files with 3 additions and 7 deletions
|
|
@ -134,19 +134,15 @@ export class StatsController extends Controller {
|
||||||
) {
|
) {
|
||||||
await prisma.$transaction(async (tx) => {
|
await prisma.$transaction(async (tx) => {
|
||||||
const record = await tx.product.findMany({
|
const record = await tx.product.findMany({
|
||||||
include: {
|
|
||||||
quotationProductServiceList: {
|
|
||||||
include: {
|
|
||||||
quotation: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
code: true,
|
code: true,
|
||||||
name: true,
|
name: true,
|
||||||
createdAt: true,
|
createdAt: true,
|
||||||
updatedAt: true,
|
updatedAt: true,
|
||||||
|
quotationProductServiceList: {
|
||||||
|
include: { quotation: true },
|
||||||
|
},
|
||||||
_count: {
|
_count: {
|
||||||
select: {
|
select: {
|
||||||
quotationProductServiceList: {
|
quotationProductServiceList: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue