- 在 `ReportJobStoreRequest` 中新增 `draw_id`、`draw_no` 和 `normalized_number` 参数的验证规则。 - 更新 `AdminReportJobService` 以支持动态生成输出路径后缀,确保导出文件名包含相关信息。 - 在 `AdminReportQueryService` 中新增多个报表类型的处理逻辑,包括 `draw_profit_summary` 和 `sold_out_number_report`。 - 添加相应的测试用例,确保新功能的正确性和稳定性。
49 lines
1019 B
PHP
49 lines
1019 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/** 彩票钱包流水 {@see wallet_txns} */
|
|
final class WalletTxn extends Model
|
|
{
|
|
protected $table = 'wallet_txns';
|
|
|
|
protected $fillable = [
|
|
'txn_no',
|
|
'player_id',
|
|
'wallet_id',
|
|
'biz_type',
|
|
'biz_no',
|
|
'direction',
|
|
'amount',
|
|
'balance_before',
|
|
'balance_after',
|
|
'status',
|
|
'external_ref_no',
|
|
'idempotent_key',
|
|
'remark',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'direction' => 'integer',
|
|
'amount' => 'integer',
|
|
'balance_before' => 'integer',
|
|
'balance_after' => 'integer',
|
|
];
|
|
}
|
|
|
|
public function player(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Player::class);
|
|
}
|
|
|
|
public function wallet(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PlayerWallet::class, 'wallet_id');
|
|
}
|
|
}
|