feat: search also cover code
This commit is contained in:
parent
005c633e4d
commit
773c7f97d8
1 changed files with 4 additions and 1 deletions
|
|
@ -59,7 +59,10 @@ export class InstitutionController extends Controller {
|
||||||
) {
|
) {
|
||||||
const where = {
|
const where = {
|
||||||
group,
|
group,
|
||||||
OR: queryOrNot<Prisma.InstitutionWhereInput[]>(query, [{ name: { contains: query } }]),
|
OR: queryOrNot<Prisma.InstitutionWhereInput[]>(query, [
|
||||||
|
{ name: { contains: query } },
|
||||||
|
{ code: { contains: query, mode: "insensitive" } },
|
||||||
|
]),
|
||||||
} satisfies Prisma.InstitutionWhereInput;
|
} satisfies Prisma.InstitutionWhereInput;
|
||||||
|
|
||||||
const [result, total] = await prisma.$transaction([
|
const [result, total] = await prisma.$transaction([
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue