<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/13
 * Time: 11:28
 */

namespace app\common\model;

use think\Model;

class Addons extends Model
{
    protected $name = 'addons';

    protected $autoWriteTimestamp = true;

    public function getSettingAttr($value)
    {
        return empty($value) ? '' : json_decode($value, 1);
    }

    public function setSettingAttr($value)
    {
        return empty($value) ? '' : json_encode($value);
    }
}