2025-05-14 21:45:16 +02:00

37 lines
945 B
TypeScript

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<ReviewSchema> {
@Field(() => Int)
note: number;
@Field({ nullable: true })
comment?: string;
}
@InputType()
export class ReviewEditInputSchema implements Partial<ReviewSchema> {
@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;
}