初始化
This commit is contained in:
43
addons/webman/model/SystemSetting.php
Normal file
43
addons/webman/model/SystemSetting.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace addons\webman\model;
|
||||
|
||||
use addons\webman\traits\DataPermissions;
|
||||
use addons\webman\traits\HasDateTimeFormatter;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SystemSetting
|
||||
* @property int id 主键
|
||||
* @property int department_id 部门/渠道id
|
||||
* @property string feature 功能名稱
|
||||
* @property int num 数量
|
||||
* @property string content 内容
|
||||
* @property string date_start 开始时间
|
||||
* @property string date_end 结束时间
|
||||
* @property int status 状态
|
||||
* @property string created_at 创建时间
|
||||
* @property string updated_at 最后一次修改时间
|
||||
*
|
||||
* @package app\model
|
||||
*/
|
||||
class SystemSetting extends Model
|
||||
{
|
||||
use HasDateTimeFormatter, DataPermissions;
|
||||
protected $fillable = ['department_id', 'feature', 'num', 'content', 'date_start', 'date_end', 'status'];
|
||||
|
||||
//数据权限字段
|
||||
protected $dataAuth = ['department_id' => 'department_id'];
|
||||
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
$this->setTable(plugin()->webman->config('database.system_setting_table'));
|
||||
}
|
||||
|
||||
const FIRST_RECHARGE_MODEL_ONE = 1; // 一次性发放
|
||||
const FIRST_RECHARGE_MODEL_ADD = 2; // 累计发放
|
||||
|
||||
const FIRST_RECHARGE_TYPE_VALUE = 1; // 固定值
|
||||
const FIRST_RECHARGE_TYPE_PERCENT = 2; // 百分比
|
||||
}
|
||||
Reference in New Issue
Block a user