You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
645 B
34 lines
645 B
2 years ago
|
<?php
|
||
|
|
||
|
namespace addons\shopro\model\commission;
|
||
|
|
||
|
use think\Model;
|
||
|
|
||
|
class Level extends Model
|
||
|
{
|
||
|
// 表名
|
||
|
protected $name = 'shopro_commission_agent_level';
|
||
|
|
||
|
// 自动写入时间戳字段
|
||
|
protected $autoWriteTimestamp = false;
|
||
|
|
||
|
// 追加属性
|
||
|
protected $append = [
|
||
|
];
|
||
|
|
||
|
public function getCommissionRulesAttr($value, $data)
|
||
|
{
|
||
|
return json_decode($value, true);
|
||
|
}
|
||
|
|
||
|
public function getUpgradeRulesAttr($value, $data)
|
||
|
{
|
||
|
return json_decode($value, true);
|
||
|
}
|
||
|
|
||
|
public function getImageAttr($value, $data)
|
||
|
{
|
||
|
if (!empty($value)) return cdnurl($value, true);
|
||
|
}
|
||
|
}
|