feat: order by status field
This commit is contained in:
parent
0bd2c1ecf2
commit
09cf32d3c7
8 changed files with 14 additions and 8 deletions
|
|
@ -58,7 +58,10 @@ export class ProductGroup extends Controller {
|
|||
{ detail: { contains: query }, ...filterStatus(status) },
|
||||
],
|
||||
} satisfies Prisma.ProductGroupWhereInput;
|
||||
return prisma.productGroup.findMany({ orderBy: { createdAt: "asc" }, where });
|
||||
return prisma.productGroup.findMany({
|
||||
orderBy: [{ statusOrder: "asc" }, { createdAt: "asc" }],
|
||||
where,
|
||||
});
|
||||
}
|
||||
|
||||
@Get("{groupId}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue