Initial commit

This commit is contained in:
Zdeněk Burda
2026-01-09 21:26:40 +01:00
parent e83aec6dca
commit 41e3ce6f25
404 changed files with 61250 additions and 28 deletions

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class QsoOverride extends Model
{
use HasFactory;
protected $table = 'qso_overrides';
protected $fillable = [
'evaluation_run_id',
'log_qso_id',
'forced_matched_log_qso_id',
'forced_status',
'forced_points',
'forced_penalty',
'reason',
'context',
'created_by_user_id',
];
protected $casts = [
'evaluation_run_id' => 'integer',
'log_qso_id' => 'integer',
'forced_matched_log_qso_id' => 'integer',
'forced_points' => 'float',
'forced_penalty' => 'float',
'context' => 'array',
'created_by_user_id' => 'integer',
];
public function evaluationRun(): BelongsTo
{
return $this->belongsTo(EvaluationRun::class);
}
public function logQso(): BelongsTo
{
return $this->belongsTo(LogQso::class);
}
public function forcedMatchedLogQso(): BelongsTo
{
return $this->belongsTo(LogQso::class, 'forced_matched_log_qso_id');
}
public function createdByUser(): BelongsTo
{
return $this->belongsTo(User::class, 'created_by_user_id');
}
}