-- 售后处置为补救完成/问题不成立时，退还此前对同一责任单元已追缴的金额。
ALTER TABLE worker_after_sales_cases
  ADD COLUMN IF NOT EXISTS refunded_amount INTEGER NOT NULL DEFAULT 0,
  ADD COLUMN IF NOT EXISTS refunded_at TIMESTAMPTZ,
  ADD COLUMN IF NOT EXISTS refunded_by TEXT NOT NULL DEFAULT '';

COMMENT ON COLUMN worker_after_sales_cases.refunded_amount IS '已退还的追缴金额；补救完成/问题不成立时按原追缴额全额退还';
