me keep
This commit is contained in:
@@ -14,7 +14,7 @@ import * as Prisma from '@prisma/client';
|
||||
import { SchemaBuilderToken } from '@smatch-corp/nestjs-pothos';
|
||||
|
||||
//
|
||||
const filterOps = ['equals', 'in', 'notIn', 'not', 'is', 'isNot'] as const;
|
||||
const filterOps = ['equals', 'in', 'notIn', 'not', 'is'] as const;
|
||||
const sortableFilterProps = ['lt', 'lte', 'gt', 'gte'] as const;
|
||||
const stringFilterOps = [
|
||||
...filterOps,
|
||||
@@ -31,7 +31,7 @@ const scalarListOps = [
|
||||
'isEmpty',
|
||||
'equals',
|
||||
] as const;
|
||||
const JsonFilterOps = ['equals', 'in', 'notIn', 'not', 'is', 'isNot'] as const;
|
||||
const JsonFilterOps = ['equals', 'in', 'notIn', 'not', 'is'] as const;
|
||||
const EnumFilterOps = ['equals', 'not'] as const;
|
||||
|
||||
@Injectable()
|
||||
@@ -564,6 +564,13 @@ export class PrismaCrudGenerator<Types extends SchemaTypes> {
|
||||
if (sortableTypes.includes(type as never)) {
|
||||
ops.push(...sortableFilterProps);
|
||||
}
|
||||
if (type === 'Json') {
|
||||
ops.push(...JsonFilterOps);
|
||||
}
|
||||
// type enum
|
||||
if (type === 'Enum') {
|
||||
ops.push(...EnumFilterOps);
|
||||
}
|
||||
|
||||
return this.builder.prismaFilter(type, {
|
||||
ops,
|
||||
|
||||
Reference in New Issue
Block a user