export const DisputeStatus = {
  OPEN: 'open',
  EVIDENCE: 'evidence',
  MEDIATION: 'mediation',
  RESOLVED: 'resolved',
  CANCELLED: 'cancelled'
};

export const DisputeReasonCode = {
  NO_SHOW: 'NO_SHOW',
  QUALITY_ISSUE: 'QUALITY_ISSUE',
  PAYMENT_DISPUTE: 'PAYMENT_DISPUTE',
  ABUSE: 'ABUSE',
  OTHER: 'OTHER'
};

export const DisputeOutcome = {
  REFUND: 'refund',
  PARTIAL_REFUND: 'partial_refund',
  COMPLETE_WORK: 'complete_work',
  OTHER: 'other'
};

export class Dispute {
  constructor(id, deal_id, opened_by_user_id, status, reason_code, summary, requested_outcome, final_decision = null, final_reason = null, decided_by_user_id = null, decided_at = null, created_at, updated_at) {
    this.id = id;
    this.deal_id = deal_id;
    this.opened_by_user_id = opened_by_user_id;
    this.status = status;
    this.reason_code = reason_code;
    this.summary = summary;
    this.requested_outcome = requested_outcome;
    this.final_decision = final_decision;
    this.final_reason = final_reason;
    this.decided_by_user_id = decided_by_user_id;
    this.decided_at = decided_at;
    this.created_at = created_at;
    this.updated_at = updated_at;
  }
}

export class DisputeEvent {
  constructor(id, dispute_id, event_type, actor_user_id, payload_json, created_at) {
    this.id = id;
    this.dispute_id = dispute_id;
    this.event_type = event_type;
    this.actor_user_id = actor_user_id;
    this.payload_json = payload_json;
    this.created_at = created_at;
  }
}