43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace app\common\model;
|
|
|
|
use support\think\Model;
|
|
|
|
class BetOrder extends Model
|
|
{
|
|
protected $name = 'bet_order';
|
|
|
|
protected $autoWriteTimestamp = true;
|
|
|
|
protected $type = [
|
|
'create_time' => 'integer',
|
|
'update_time' => 'integer',
|
|
'pick_numbers' => 'json',
|
|
'unit_amount' => 'string',
|
|
'total_amount' => 'string',
|
|
'win_amount' => 'string',
|
|
'jackpot_extra_amount' => 'string',
|
|
'status' => 'integer',
|
|
'pick_count' => 'integer',
|
|
'streak_at_bet' => 'integer',
|
|
'is_auto' => 'integer',
|
|
];
|
|
|
|
public function user(): \think\model\relation\BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'id');
|
|
}
|
|
|
|
public function channel(): \think\model\relation\BelongsTo
|
|
{
|
|
return $this->belongsTo(Channel::class, 'channel_id', 'id');
|
|
}
|
|
|
|
public function gamePeriod(): \think\model\relation\BelongsTo
|
|
{
|
|
return $this->belongsTo(GamePeriod::class, 'period_id', 'id');
|
|
}
|
|
}
|
|
|