This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/common/model/DeliveryRule.php
2020-04-25 22:20:29 +08:00

33 lines
568 B
PHP

<?php
namespace app\common\model;
/**
* 配送模板区域及运费模型
* Class DeliveryRule
* @package app\store\model
*/
class DeliveryRule extends BaseModel
{
protected $name = 'delivery_rule';
protected $updateTime = false;
/**
* 追加字段
* @var array
*/
protected $append = ['region_data'];
/**
* 地区集转为数组格式
* @param $value
* @param $data
* @return array
*/
public function getRegionDataAttr($value, $data)
{
return explode(',', $data['region']);
}
}