import { IsBoolean, IsIn, IsObject, IsOptional, IsString } from 'class-validator';

export class UpdateSmsSettingsDto {
  @IsBoolean()
  enabled!: boolean;

  @IsIn(['mock', 'aliyun', 'tencent'])
  provider!: 'mock' | 'aliyun' | 'tencent';

  @IsOptional()
  @IsString()
  signName?: string;

  @IsOptional()
  @IsString()
  accessKeyId?: string;

  @IsOptional()
  @IsString()
  accessKeySecret?: string;

  @IsOptional()
  @IsString()
  region?: string;

  @IsOptional()
  @IsObject()
  templates?: Record<string, string>;
}

export interface SmsSettingsVo {
  enabled: boolean;
  provider: 'mock' | 'aliyun' | 'tencent';
  signName?: string;
  accessKeyId?: string;
  accessKeySecret?: string;
  region?: string;
  templates?: Record<string, string>;
}