// server/src/model-config/dto/model-config-response.dto.ts
import { Exclude, Expose, Transform } from 'class-transformer';
import { ModelConfig } from '../model-config.entity';

export class ModelConfigResponseDto {
  id: string;
  name: string;
  provider: string;
  modelId: string;
  baseUrl?: string;

  @Transform(({ value }) => (value ? '********' : undefined))
  apiKey?: string;

  type: string;
  isEnabled?: boolean;
  isDefault?: boolean;
  createdAt: Date;
  updatedAt: Date;

  constructor(partial: Partial<ModelConfig>) {
    Object.assign(this, partial);
  }
}
