Files
ulitka/src/modules/issue/presentation/graphql/create-issue.input.ts
T
vadim 40d579cdb9
Gitea Actions Demo / Deploy (push) Successful in 29s
add filed dueDate
2026-09-27 22:41:35 +03:00

44 lines
763 B
TypeScript

import { Field, InputType, Int } from '@nestjs/graphql';
import { IsDate, IsInt, IsNotEmpty, IsOptional, IsString, Max, MaxLength, Min } from 'class-validator';
@InputType()
export class CreateIssueInput {
@Field()
@IsString()
@IsNotEmpty()
key: string;
@Field()
@IsString()
@IsNotEmpty()
@MaxLength(200)
title: string;
@Field()
@IsString()
@IsNotEmpty()
projectId: string;
@Field({ nullable: true })
@IsOptional()
@IsString()
content?: string;
@Field(() => Int, { nullable: true })
@IsOptional()
@IsInt()
@Min(0)
@Max(4)
priority?: number;
@Field({ nullable: true })
@IsOptional()
@IsString()
assignee?: string;
@Field(() => Date, { nullable: true })
@IsOptional()
@IsDate()
dueDate?: Date;
}