import ImageComponent from '@lib/seed/interfaces/components'; import { ArgsType, Field, InputType, Int } from 'type-graphql'; import { CommentReviewInputSchema } from '../../components'; import { ReviewSchema } from './reviews.schema'; @InputType() export class ReviewNewInputSchema extends CommentReviewInputSchema implements Partial { @Field(() => Int) note: number; @Field({ nullable: true }) comment?: string; } @InputType() export class ReviewEditInputSchema implements Partial { @Field(() => Int, { nullable: true }) note?: number; @Field({ nullable: true }) comment?: string; @Field(() => ImageComponent, { nullable: true }) file?: ImageComponent; } @ArgsType() export class ReviewArgsSchemma { @Field() ressourceId: string; @Field(() => Int, { nullable: true }) noteMin?: number; @Field(() => Int, { nullable: true }) noteMax?: number; }