Files
lotteryLaravel/app/Models/ReconcileJob.php
kang 4e370a79dc feat: enhance admin role management and reconciliation features
- Updated AGENTS.md to clarify site admin roles and their associated permissions.
- Refactored reconciliation controllers to include admin user validation and improved access control based on admin roles.
- Enhanced AdminReconcileJobService to support player-specific reconciliation and site-based job creation.
- Removed deprecated rebate commission report functionality from the API and related services.
- Improved dashboard overview builders to accommodate new site operator roles and their specific functionalities.
2026-06-16 16:04:01 +08:00

47 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
final class ReconcileJob extends Model
{
protected $table = 'reconcile_jobs';
protected $fillable = [
'job_no',
'admin_user_id',
'admin_site_id',
'reconcile_type',
'status',
'period_start',
'period_end',
'summary_json',
'finished_at',
];
protected function casts(): array
{
return [
'period_start' => 'datetime',
'period_end' => 'datetime',
'summary_json' => 'array',
'finished_at' => 'datetime',
];
}
/** @return BelongsTo<AdminUser, ReconcileJob> */
public function adminUser(): BelongsTo
{
return $this->belongsTo(AdminUser::class, 'admin_user_id');
}
/** @return HasMany<ReconcileItem, ReconcileJob> */
public function items(): HasMany
{
return $this->hasMany(ReconcileItem::class, 'reconcile_job_id');
}
}