import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional, IsString, MaxLength, MinLength } from 'class-validator';

export class CreateSkinGenerationJobDto {
  @ApiProperty({
    description: '玩家上传的角色参考图PNG/JPG/WebP，base64，不包含data URL前缀',
    example: 'iVBORw0KGgoAAAANSUhEUgAA...',
  })
  @IsString()
  @MinLength(100)
  @MaxLength(12_000_000)
  source_image_base64: string;

  @ApiPropertyOptional({
    description: '上传图片的MIME类型',
    example: 'image/png',
  })
  @IsOptional()
  @IsString()
  @MaxLength(40)
  source_mime_type?: string;

  @ApiPropertyOptional({
    description: '玩家给生成角色起的名字',
    example: '鲸纹水手',
  })
  @IsOptional()
  @IsString()
  @MaxLength(40)
  name?: string;
}
