24 lines
434 B
TypeScript
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
|
|
}
|