更新 AdminJackpotPoolUpdateController 校验规则,禁止传入 current_amount。 优化 AdminRiskPoolManualStatusController:更新奖池状态后同步 Redis 状态。 在 TransferOrderReconcileController 中新增 completeCredit 方法,用于处理卡住的转账订单对账。 调整 TransferOrderListController:优化转账订单处理条件。 在 TicketItemsIndexController 中实现支持时区的日期筛选,提升日期处理准确性。 扩展 JackpotPool 模型,新增 adjustments 关联关系。 改进票据与钱包相关服务中的错误处理和事务管理。
55 lines
1.5 KiB
PHP
55 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/** Jackpot 奖池配置与当前水位 {@see jackpot_pools} */
|
|
final class JackpotPool extends Model
|
|
{
|
|
protected $fillable = [
|
|
'currency_code',
|
|
'current_amount',
|
|
'contribution_rate',
|
|
'trigger_threshold',
|
|
'payout_rate',
|
|
'force_trigger_draw_gap',
|
|
'min_bet_amount',
|
|
'combo_trigger_play_codes',
|
|
'status',
|
|
'last_trigger_draw_id',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'current_amount' => 'integer',
|
|
'contribution_rate' => 'decimal:4',
|
|
'trigger_threshold' => 'integer',
|
|
'payout_rate' => 'decimal:4',
|
|
'force_trigger_draw_gap' => 'integer',
|
|
'min_bet_amount' => 'integer',
|
|
'combo_trigger_play_codes' => 'array',
|
|
'status' => 'integer',
|
|
'last_trigger_draw_id' => 'integer',
|
|
];
|
|
}
|
|
|
|
public function lastTriggerDraw(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Draw::class, 'last_trigger_draw_id');
|
|
}
|
|
|
|
public function contributions(): HasMany
|
|
{
|
|
return $this->hasMany(JackpotContribution::class, 'jackpot_pool_id');
|
|
}
|
|
|
|
public function adjustments(): HasMany
|
|
{
|
|
return $this->hasMany(JackpotPoolAdjustment::class, 'jackpot_pool_id');
|
|
}
|
|
}
|