<?php
/**
 * Created by PhpStorm.
 * User: sunmoon<i@liming.me>
 * Date: 2019/07/29
 * Time: 上午9:39
 */


namespace common\libs\logging\operate\valueType;

class Status extends AbstractValueType {
    public $defaultLabel = [
        '1' => '开启',
        '0' => '关闭',
    ];
    public function result(){
        $value = $this->getValue();
        if($this->data){
            $this->defaultLabel = $this->data;
        }
        return ($value == 1) ? $this->defaultLabel['1'] : $this->defaultLabel['0'];
    }
}