游戏-渠道管理

This commit is contained in:
2026-04-01 15:51:33 +08:00
parent 1d350ddb68
commit 165689bccf
7 changed files with 436 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace app\common\model;
use support\think\Model;
/**
* GameChannel
*/
class GameChannel extends Model
{
// 表名
protected $name = 'game_channel';
// 自动写入时间戳字段
protected $autoWriteTimestamp = true;
// 字段类型转换
protected $type = [
'create_time' => 'integer',
'update_time' => 'integer',
];
public function getprofitAmountAttr($value): ?float
{
return is_null($value) ? null : (float)$value;
}
public function adminGroup(): \think\model\relation\BelongsTo
{
return $this->belongsTo(\app\admin\model\AdminGroup::class, 'admin_group_id', 'id');
}
public function admin(): \think\model\relation\BelongsTo
{
return $this->belongsTo(\app\admin\model\Admin::class, 'admin_id', 'id');
}
}