36 lines
781 B
PHP
36 lines
781 B
PHP
<?php
|
|
|
|
namespace app\common\model;
|
|
|
|
use support\think\Model;
|
|
|
|
/**
|
|
* 用户主表
|
|
*/
|
|
class User extends Model
|
|
{
|
|
protected $name = 'user';
|
|
|
|
protected $autoWriteTimestamp = true;
|
|
|
|
protected $type = [
|
|
'create_time' => 'integer',
|
|
'update_time' => 'integer',
|
|
'coin' => 'string',
|
|
'total_deposit_coin' => 'string',
|
|
'total_valid_bet_coin' => 'string',
|
|
'risk_flags' => 'integer',
|
|
'current_streak' => 'integer',
|
|
];
|
|
|
|
public function channel(): \think\model\relation\BelongsTo
|
|
{
|
|
return $this->belongsTo(Channel::class, 'channel_id', 'id');
|
|
}
|
|
|
|
public function admin(): \think\model\relation\BelongsTo
|
|
{
|
|
return $this->belongsTo(\app\admin\model\Admin::class, 'admin_id', 'id');
|
|
}
|
|
}
|