feat(ideas): secondary_products meeladen in IdeaDto en alle queries
Voegt IdeaProduct schema toe (dependency van story-qtkvz6ly), breidt IdeaWithProduct type en IdeaDto interface uit met secondary_products array, en laadt de relatie mee in findMany/findFirst in page.tsx en REST GET. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d5333eb7d8
commit
4a929b1962
5 changed files with 32 additions and 6 deletions
|
|
@ -32,7 +32,10 @@ export async function GET(request: Request) {
|
|||
...(productIdParam ? { product_id: productIdParam } : {}),
|
||||
...(status ? { status } : {}),
|
||||
},
|
||||
include: { product: { select: { id: true, name: true, repo_url: true } } },
|
||||
include: {
|
||||
product: { select: { id: true, name: true, repo_url: true } },
|
||||
secondary_products: { include: { product: { select: { id: true, name: true } } } },
|
||||
},
|
||||
orderBy: { created_at: 'desc' },
|
||||
take: 200,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue