<?php

namespace app\common\model;

class ReservedModel extends BaseModel
{
    // 设置表名
    protected $name = 'reserved';

    //自动完成
    protected $autoWriteTimestamp = true;

    // 常量
    const STATUS = [1 => '显示', 2 => '隐藏'];

    const STATUS_SHOW = 1;
    const STATUS_HIDE  = 2;

    public function getStatusTextAttr($value, $data)
    {
        return self::STATUS[$data['status']];
    }

}