<?php

namespace app\common\model;

class NoticeModel extends BaseModel
{
    // 设置表名
    protected $name = 'notice';

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

    // 常量
    const STATUS = [1 => '已发布', 2 => '待修改'];

    const STATUS_PUBLISH = 1;
    const STATUS_MODIFY  = 2;

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

}