import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
import { IsUsername } from '../../shared/decorators/class-validator/is-username.decorator';
import { IsOptional } from '../../shared/decorators/class-validator/is-optional.decorator';

export class SignInDto {
  @IsOptional()
  @IsUsername()
  username?: string;

  @IsOptional()
  @IsEmail()
  @IsNotEmpty()
  email?: string;

  @IsString()
  @IsNotEmpty()
  password: string;
}

export class SignInResponseDto {
  data: {
    accessToken: string;
  };
}
