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

@Pipe({
  name: 'discountCodeStatus'
})
export class DiscountCodeStatusPipe implements PipeTransform {

  transform(value: number): string {
    switch (value) {
      case 1:
        return '待领取';
      case 2:
        return '待使用';
      case 3:
        return '已使用';
      case 4:
        return '已过期';
      case 5:
        return '已分配';
    }
  }

}
