Files
dafuweng-saiadmin6.x/server/app/dice/model/ante_config/DiceAnteConfig.php
2026-03-25 14:33:58 +08:00

49 lines
1.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\dice\model\ante_config;
use plugin\saiadmin\basic\think\BaseModel;
/**
* 底注配置模型
*
* @property int $id ID
* @property string $name 名称
* @property string $title 标题
* @property int $is_default 是否默认底注0否 1是全表仅允许一条为1
* @property int $mult 底注倍率
* @property string $create_time 创建时间
* @property string $update_time 更新时间
*/
class DiceAnteConfig extends BaseModel
{
protected $pk = 'id';
protected $table = 'dice_ante_config';
public function searchNameAttr($query, $value): void
{
if ($value !== '' && $value !== null) {
$query->where('name', 'like', '%' . $value . '%');
}
}
public function searchTitleAttr($query, $value): void
{
if ($value !== '' && $value !== null) {
$query->where('title', 'like', '%' . $value . '%');
}
}
public function searchIsDefaultAttr($query, $value): void
{
if ($value !== '' && $value !== null) {
$query->where('is_default', (int) $value);
}
}
}