<?php

namespace app\common\model;

class MenuModel extends BaseModel
{
    // 设置表名
    protected $name = 'menu';

    // 设置字段自动转换类型
    protected $type = [
        'urlarr' => 'array',
    ];

    // 常量
    const STATUS = [1 => '正常', 2 => '禁用'];

    const STATUS_NORMAL  = 1;
    const STATUS_DISABLE = 2;

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


}