Initial commit
This commit is contained in:
56
app/Models/QsoOverride.php
Normal file
56
app/Models/QsoOverride.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user