import { ErrorCode } from '../constants/error-codes';

export class ErrorResponseDto {
  success: boolean;
  error: {
    code: ErrorCode;
    message: string;
    details?: any;
    timestamp: string;
    path?: string;
    statusCode: number;
  };

  constructor(
    code: ErrorCode,
    message: string,
    statusCode: number,
    path?: string,
    details?: any,
  ) {
    this.success = false;
    this.error = {
      code,
      message,
      statusCode,
      timestamp: new Date().toISOString(),
      path,
      details,
    };
  }
}
