修复框架权限鉴权报错
This commit is contained in:
32
app/common/model/GameConfig.php
Normal file
32
app/common/model/GameConfig.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use support\think\Model;
|
||||
|
||||
/**
|
||||
* GameConfig
|
||||
*/
|
||||
class GameConfig extends Model
|
||||
{
|
||||
// 表主键
|
||||
protected $pk = 'ID';
|
||||
|
||||
// 表名
|
||||
protected $name = 'game_config';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 字段类型转换
|
||||
protected $type = [
|
||||
'create_time' => 'integer',
|
||||
'update_time' => 'integer',
|
||||
];
|
||||
|
||||
|
||||
public function channel(): \think\model\relation\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(\app\common\model\GameChannel::class, 'channel_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user