import { WithOptional } from '../type/optional.type'; export class BaseResponseDto { statusCode?: number; message: string; error?: string; data?: any; success?: boolean; static wrap({ data, statusCode = 200, message = 'Success', success = true, error = undefined, }: WithOptional) { return { data, statusCode, success, message, error }; } }