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

/**
 * 更新站点设置DTO
 */
export class UpdateSiteSettingsDto {
  @ApiProperty({ description: '网站名称', required: false })
  @IsOptional()
  @IsString()
  site_name?: string;

  @ApiProperty({ description: '网站标题', required: false })
  @IsOptional()
  @IsString()
  site_title?: string;

  @ApiProperty({ description: '网站关键词', required: false })
  @IsOptional()
  @IsString()
  site_keywords?: string;

  @ApiProperty({ description: '网站描述', required: false })
  @IsOptional()
  @IsString()
  site_description?: string;

  @ApiProperty({ description: '网站Logo', required: false })
  @IsOptional()
  @IsString()
  site_logo?: string;

  @ApiProperty({ description: '网站图标', required: false })
  @IsOptional()
  @IsString()
  site_favicon?: string;

  @ApiProperty({ description: 'ICP备案号', required: false })
  @IsOptional()
  @IsString()
  icp_number?: string;

  @ApiProperty({ description: '版权信息', required: false })
  @IsOptional()
  @IsString()
  copyright?: string;

  @ApiProperty({ description: '网站状态', required: false })
  @IsOptional()
  site_status?: number;

  @ApiProperty({ description: '关闭原因', required: false })
  @IsOptional()
  @IsString()
  close_reason?: string;
}

/**
 * 站点设置响应DTO
 */
export class SiteSettingsDto {
  @ApiProperty({ description: '网站名称' })
  site_name: string;

  @ApiProperty({ description: '网站标题' })
  site_title: string;

  @ApiProperty({ description: '网站关键词' })
  site_keywords: string;

  @ApiProperty({ description: '网站描述' })
  site_description: string;

  @ApiProperty({ description: '网站Logo' })
  site_logo: string;

  @ApiProperty({ description: '网站图标' })
  site_favicon: string;

  @ApiProperty({ description: 'ICP备案号' })
  icp_number: string;

  @ApiProperty({ description: '版权信息' })
  copyright: string;

  @ApiProperty({ description: '网站状态' })
  site_status: number;

  @ApiProperty({ description: '关闭原因' })
  close_reason: string;
}