126 lines
3.4 KiB
PHP
126 lines
3.4 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class LogResult extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'log_results';
|
|
|
|
protected $fillable = [
|
|
'evaluation_run_id',
|
|
'log_id',
|
|
|
|
'band_id',
|
|
'category_id',
|
|
'power_category_id',
|
|
'sixhr_category',
|
|
'sixhr_ranking_bucket',
|
|
'operating_window_start_utc',
|
|
'operating_window_end_utc',
|
|
'operating_window_2_start_utc',
|
|
'operating_window_2_end_utc',
|
|
'operating_window_hours',
|
|
'operating_window_qso_count',
|
|
|
|
'claimed_qso_count',
|
|
'claimed_score',
|
|
|
|
'valid_qso_count',
|
|
'dupe_qso_count',
|
|
'busted_qso_count',
|
|
'other_error_qso_count',
|
|
'total_qso_count',
|
|
'discarded_qso_count',
|
|
'discarded_points',
|
|
'discarded_qso_percent',
|
|
'unique_qso_count',
|
|
|
|
'official_score',
|
|
'penalty_score',
|
|
'base_score',
|
|
'multiplier_count',
|
|
'multiplier_score',
|
|
'score_per_qso',
|
|
|
|
'rank_overall',
|
|
'rank_in_category',
|
|
'rank_overall_ok',
|
|
'rank_in_category_ok',
|
|
|
|
'status',
|
|
'status_reason',
|
|
];
|
|
|
|
protected $casts = [
|
|
'evaluation_run_id' => 'integer',
|
|
'log_id' => 'integer',
|
|
'band_id' => 'integer',
|
|
'category_id' => 'integer',
|
|
'power_category_id' => 'integer',
|
|
'sixhr_category' => 'boolean',
|
|
'sixhr_ranking_bucket' => 'string',
|
|
'operating_window_start_utc' => 'datetime',
|
|
'operating_window_end_utc' => 'datetime',
|
|
'operating_window_2_start_utc' => 'datetime',
|
|
'operating_window_2_end_utc' => 'datetime',
|
|
'operating_window_hours' => 'integer',
|
|
'operating_window_qso_count' => 'integer',
|
|
|
|
'claimed_qso_count' => 'integer',
|
|
'claimed_score' => 'integer',
|
|
|
|
'valid_qso_count' => 'integer',
|
|
'dupe_qso_count' => 'integer',
|
|
'busted_qso_count' => 'integer',
|
|
'other_error_qso_count' => 'integer',
|
|
'total_qso_count' => 'integer',
|
|
'discarded_qso_count' => 'integer',
|
|
'discarded_points' => 'integer',
|
|
'discarded_qso_percent' => 'float',
|
|
'unique_qso_count' => 'integer',
|
|
|
|
'official_score' => 'integer',
|
|
'penalty_score' => 'integer',
|
|
'base_score' => 'integer',
|
|
'multiplier_count' => 'integer',
|
|
'multiplier_score' => 'integer',
|
|
'score_per_qso' => 'float',
|
|
|
|
'rank_overall' => 'integer',
|
|
'rank_in_category' => 'integer',
|
|
'rank_overall_ok' => 'integer',
|
|
'rank_in_category_ok' => 'integer',
|
|
];
|
|
|
|
public function evaluationRun(): BelongsTo
|
|
{
|
|
return $this->belongsTo(EvaluationRun::class);
|
|
}
|
|
|
|
public function log(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Log::class);
|
|
}
|
|
|
|
public function band(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Band::class);
|
|
}
|
|
|
|
public function category(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
|
|
public function powerCategory(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PowerCategory::class);
|
|
}
|
|
}
|