2025-07-05 09:47:38 +03:00

24 lines
434 B
TypeScript

import { Field, InputType } from '@nestjs/graphql'
import { IsNotEmpty, IsOptional, IsString, Length, MinLength } from 'class-validator'
@InputType()
export class LoginInput {
@Field()
@IsString()
@IsNotEmpty()
login: string
@Field()
@IsString()
@IsNotEmpty()
@MinLength(8)
password: string
@Field(() => String, { nullable: true })
@IsString()
@IsNotEmpty()
@IsOptional()
@Length(6, 6)
pin?: string
}