feat(admin): 补全报表中心汇总 API 并恢复 report-jobs 导出
新增每日盈亏、玩家输赢、玩法维度、佣金回水四类聚合查询与权限注册,恢复报表异步导出任务;审计日志支持按操作人与日期筛选。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
37
app/Models/ReportJob.php
Normal file
37
app/Models/ReportJob.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
final class ReportJob extends Model
|
||||
{
|
||||
protected $table = 'report_jobs';
|
||||
|
||||
protected $fillable = [
|
||||
'job_no',
|
||||
'admin_user_id',
|
||||
'report_type',
|
||||
'export_format',
|
||||
'filter_json',
|
||||
'status',
|
||||
'output_path',
|
||||
'error_message',
|
||||
'finished_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'filter_json' => 'array',
|
||||
'finished_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
/** @return BelongsTo<AdminUser, ReportJob> */
|
||||
public function adminUser(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(AdminUser::class, 'admin_user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user