35 lines
909 B
TypeScript
35 lines
909 B
TypeScript
import ImageComponent from '@lib/seed/interfaces/components';
|
|
import { ArgsType, Field, InputType, Int } from 'type-graphql';
|
|
import { CommentReviewInputSchema } from '../../components';
|
|
import { CommentSchema } from './comments.schema';
|
|
|
|
@InputType()
|
|
export class CommentNewInputSchema extends CommentReviewInputSchema implements Partial<CommentSchema> {
|
|
@Field()
|
|
comment: string;
|
|
}
|
|
|
|
@InputType()
|
|
export class CommentNewInputCustomSchema implements Partial<CommentSchema> {
|
|
@Field()
|
|
comment: string;
|
|
|
|
@Field(() => ImageComponent, { nullable: true })
|
|
file?: ImageComponent;
|
|
}
|
|
|
|
@InputType()
|
|
export class CommentEditInputSchema implements Partial<CommentSchema> {
|
|
@Field({ nullable: true })
|
|
comment?: string;
|
|
|
|
@Field(() => ImageComponent, { nullable: true })
|
|
file?: ImageComponent;
|
|
}
|
|
|
|
@ArgsType()
|
|
export class CommentArgsSchemma {
|
|
@Field()
|
|
ressourceId: string;
|
|
}
|