<?php

namespace app\common\model;

class SlideModel extends BaseModel
{
    // 设置表名
    protected $name = 'slide';

    // 常量
    const TAB    = [1 => '首页轮播图'];
    const STATUS = [1 => '显示', 2 => '隐藏'];

    const TAB_INDEX   = 1;
    const STATUS_SHOW = 1;
    const STATUS_HIDE = 2;

    public function getTabTextAttr($value, $data)
    {
        return self::TAB[$data['tab']];
    }

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


}