62 lines
1.6 KiB
PHP
62 lines
1.6 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | saiadmin [ saiadmin快速开发框架 ]
|
||
// +----------------------------------------------------------------------
|
||
// | Author: your name
|
||
// +----------------------------------------------------------------------
|
||
namespace app\dice\model\lottery_config;
|
||
|
||
use plugin\saiadmin\basic\think\BaseModel;
|
||
|
||
/**
|
||
* 色子奖池配置模型
|
||
*
|
||
* dice_lottery_config 色子奖池配置
|
||
*
|
||
* @property $id ID
|
||
* @property $name 名称
|
||
* @property $remark 备注
|
||
* @property $type 奖池类型
|
||
* @property $safety_line 安全线
|
||
* @property $create_time 创建时间
|
||
* @property $update_time 修改时间
|
||
* @property $t1_weight T1池权重
|
||
* @property $t2_weight T2池权重
|
||
* @property $t3_weight T3池权重
|
||
* @property $t4_weight T4池权重
|
||
* @property $t5_weight T5池权重
|
||
* @property $ev 池子累计盈利(游戏结算时累加,仅展示不可编辑)
|
||
*/
|
||
class DiceLotteryConfig extends BaseModel
|
||
{
|
||
/**
|
||
* 数据表主键
|
||
* @var string
|
||
*/
|
||
protected $pk = 'id';
|
||
|
||
/**
|
||
* 数据库表名称
|
||
* @var string
|
||
*/
|
||
protected $table = 'dice_lottery_config';
|
||
|
||
/**
|
||
* 名称 搜索
|
||
*/
|
||
public function searchNameAttr($query, $value)
|
||
{
|
||
$query->where('name', 'like', '%'.$value.'%');
|
||
}
|
||
|
||
/**
|
||
* 奖池类型 搜索(type=0/1/2 等)
|
||
*/
|
||
public function searchTypeAttr($query, $value)
|
||
{
|
||
if ($value !== '' && $value !== null) {
|
||
$query->where('type', '=', $value);
|
||
}
|
||
}
|
||
}
|