From 5cd9c608a739bf6067f21f9132cb135f6d3ba30f Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Wed, 25 Apr 2018 11:56:05 -0500 Subject: [PATCH] Add score to model and fields --- app/Http/Requests/Acars/FileRequest.php | 1 + app/Http/Requests/Acars/PrefileRequest.php | 1 + app/Http/Requests/Acars/UpdateRequest.php | 2 +- app/Models/Pirep.php | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/Acars/FileRequest.php b/app/Http/Requests/Acars/FileRequest.php index d835d264..9c7ddd6b 100644 --- a/app/Http/Requests/Acars/FileRequest.php +++ b/app/Http/Requests/Acars/FileRequest.php @@ -42,6 +42,7 @@ class FileRequest extends FormRequest 'route' => 'nullable', 'notes' => 'nullable', 'source_name' => 'nullable', + 'score' => 'nullable|integer', 'landing_rate' => 'nullable|numeric', 'flight_type' => 'nullable|integer', 'block_off_time' => 'nullable|date', diff --git a/app/Http/Requests/Acars/PrefileRequest.php b/app/Http/Requests/Acars/PrefileRequest.php index c968d582..609059aa 100644 --- a/app/Http/Requests/Acars/PrefileRequest.php +++ b/app/Http/Requests/Acars/PrefileRequest.php @@ -37,6 +37,7 @@ class PrefileRequest extends FormRequest 'block_fuel' => 'nullable|numeric', 'route' => 'nullable', 'notes' => 'nullable', + 'score' => 'nullable|integer', 'flight_type' => 'nullable|integer', 'block_off_time' => 'nullable|date', 'block_on_time' => 'nullable|date', diff --git a/app/Http/Requests/Acars/UpdateRequest.php b/app/Http/Requests/Acars/UpdateRequest.php index 53bfc61c..c0c563e7 100644 --- a/app/Http/Requests/Acars/UpdateRequest.php +++ b/app/Http/Requests/Acars/UpdateRequest.php @@ -47,7 +47,7 @@ class UpdateRequest extends FormRequest 'block_on_time' => 'nullable|date', 'created_at' => 'nullable|date', 'status' => 'nullable', - 'source_name' => 'nullable', + 'score' => 'nullable|integer', # See if the fare objects are included and formatted properly 'fares' => 'nullable|array', diff --git a/app/Models/Pirep.php b/app/Models/Pirep.php index aadb3474..375e64b5 100644 --- a/app/Models/Pirep.php +++ b/app/Models/Pirep.php @@ -33,6 +33,7 @@ use PhpUnitsOfMeasure\Exception\NonStringUnitName; * @property integer block_time * @property integer flight_time In minutes * @property integer planned_flight_time + * @property integer score * @property User user * @property Flight|null flight * @property Collection fields @@ -74,6 +75,7 @@ class Pirep extends Model 'landing_rate', 'route', 'notes', + 'score', 'source', 'source_name', 'flight_type', @@ -100,6 +102,7 @@ class Pirep extends Model 'block_fuel' => 'float', 'fuel_used' => 'float', 'landing_rate' => 'float', + 'score' => 'integer', 'source' => 'integer', 'state' => 'integer', 'block_off_time' => 'datetime',