import { IsString, IsNotEmpty, MaxLength, IsOptional, IsBoolean, IsNumber, Min, Max } from 'class-validator';

export class CreateLoginUserDto {
  @IsString()
  @IsNotEmpty()
  @MaxLength(128)
  username!: string;

  @IsString()
  @IsNotEmpty()
  @MaxLength(2048)
  password_hash!: string;

  @IsString()
  @IsOptional()
  @MaxLength(64)
  auth_token?: string;

  @IsString()
  @IsOptional()
  @MaxLength(512)
  auth_signature?: string;

  @IsString()
  @IsOptional()
  @MaxLength(128)
  auth_device_id?: string;

  @IsString()
  @IsOptional()
  @MaxLength(255)
  note?: string;

  @IsNumber()
  @IsOptional()
  @Min(0)
  @Max(100000)
  sort_order?: number;

  @IsBoolean()
  @IsOptional()
  is_active?: boolean;
}
