import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { Decimal } from '@prisma/client/runtime'; import { GraphQLDecimal } from 'prisma-graphql-type-decimal'; import { transformToDecimal } from 'prisma-graphql-type-decimal'; import { Transform } from 'class-transformer'; import { Type } from 'class-transformer'; import { NestedDecimalFilter } from './nested-decimal-filter.input'; @InputType() export class DecimalFilter { @Field(() => GraphQLDecimal, {nullable:true}) @Type(() => Object) @Transform(transformToDecimal) equals?: Decimal; @Field(() => [GraphQLDecimal], {nullable:true}) @Type(() => Object) @Transform(transformToDecimal) in?: Array; @Field(() => [GraphQLDecimal], {nullable:true}) @Type(() => Object) @Transform(transformToDecimal) notIn?: Array; @Field(() => GraphQLDecimal, {nullable:true}) @Type(() => Object) @Transform(transformToDecimal) lt?: Decimal; @Field(() => GraphQLDecimal, {nullable:true}) @Type(() => Object) @Transform(transformToDecimal) lte?: Decimal; @Field(() => GraphQLDecimal, {nullable:true}) @Type(() => Object) @Transform(transformToDecimal) gt?: Decimal; @Field(() => GraphQLDecimal, {nullable:true}) @Type(() => Object) @Transform(transformToDecimal) gte?: Decimal; @Field(() => NestedDecimalFilter, {nullable:true}) not?: NestedDecimalFilter; }