import { IsOptional, IsString, MaxLength } from 'class-validator'

export class SendCodeDto {
    @IsString()
    @MaxLength(30)
    readonly phone: string

    @IsString()
    @IsOptional()
    readonly sessionId?: string

    @IsString()
    @IsOptional()
    readonly sig?: string

    @IsString()
    @IsOptional()
    readonly token?: string
}

export class VerifyCodeDto {
    @IsString()
    readonly phone: string

    @IsString()
    readonly code: string
}
