1.新增游戏管理接口和菜单
2.创建对接第三方文档
This commit is contained in:
53
server/app/dice/model/game/DiceGame.php
Normal file
53
server/app/dice/model/game/DiceGame.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | saiadmin [ saiadmin快速开发框架 ]
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\dice\model\game;
|
||||
|
||||
use plugin\saiadmin\basic\eloquent\BaseModel;
|
||||
|
||||
/**
|
||||
* 游戏管理模型
|
||||
*
|
||||
* dice_game 游戏配置表
|
||||
*/
|
||||
class DiceGame extends BaseModel
|
||||
{
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $table = 'dice_game';
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
public function searchProviderCodeAttr($query, $value): void
|
||||
{
|
||||
if ($value === '' || $value === null) {
|
||||
return;
|
||||
}
|
||||
$query->where('provider_code', '=', $value);
|
||||
}
|
||||
|
||||
public function searchGameCodeAttr($query, $value): void
|
||||
{
|
||||
if ($value === '' || $value === null) {
|
||||
return;
|
||||
}
|
||||
$query->where('game_code', 'like', '%' . $value . '%');
|
||||
}
|
||||
|
||||
public function searchGameTypeAttr($query, $value): void
|
||||
{
|
||||
if ($value === '' || $value === null) {
|
||||
return;
|
||||
}
|
||||
$query->where('game_type', '=', $value);
|
||||
}
|
||||
|
||||
public function searchStatusAttr($query, $value): void
|
||||
{
|
||||
if ($value === '' || $value === null) {
|
||||
return;
|
||||
}
|
||||
$query->where('status', '=', $value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user