import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'tradeOrderStatus',
  standalone: true
})
export class TradeOrderStatusPipe implements PipeTransform {

  transform(status: number): string {
    switch (status) {
      case 1:
        return '待支付';
      case 2:
        return '支付中';
      case 3:
        return '支付成功';
      case 4:
        return '支付失败';
      case 5:
        return '已取消';
      case 6:
        return '已退款';
      default:
        return '未知';
    }
  }
}
