更新 AdminJackpotPoolUpdateController 校验规则,禁止传入 current_amount。 优化 AdminRiskPoolManualStatusController:更新奖池状态后同步 Redis 状态。 在 TransferOrderReconcileController 中新增 completeCredit 方法,用于处理卡住的转账订单对账。 调整 TransferOrderListController:优化转账订单处理条件。 在 TicketItemsIndexController 中实现支持时区的日期筛选,提升日期处理准确性。 扩展 JackpotPool 模型,新增 adjustments 关联关系。 改进票据与钱包相关服务中的错误处理和事务管理。
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/** 奖池余额人工调整流水 {@see jackpot_pool_adjustments} */
|
|
final class JackpotPoolAdjustment extends Model
|
|
{
|
|
protected $fillable = [
|
|
'adjustment_no',
|
|
'jackpot_pool_id',
|
|
'admin_user_id',
|
|
'amount_delta',
|
|
'balance_before',
|
|
'balance_after',
|
|
'reason',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'amount_delta' => 'integer',
|
|
'balance_before' => 'integer',
|
|
'balance_after' => 'integer',
|
|
];
|
|
}
|
|
|
|
/** @return BelongsTo<JackpotPool, JackpotPoolAdjustment> */
|
|
public function pool(): BelongsTo
|
|
{
|
|
return $this->belongsTo(JackpotPool::class, 'jackpot_pool_id');
|
|
}
|
|
|
|
/** @return BelongsTo<AdminUser, JackpotPoolAdjustment> */
|
|
public function adminUser(): BelongsTo
|
|
{
|
|
return $this->belongsTo(AdminUser::class, 'admin_user_id');
|
|
}
|
|
}
|