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

@Pipe({
  name: 'status'
})
export class StatusPipe implements PipeTransform {

  transform(value: number): string {
    switch (value) {
      case 1:
        return '编辑中';
      case 2:
        return '已发布';
      case 3:
        return '已结束';
    }
  }

}
