Fixed scoping rules in Model classes

This commit is contained in:
Nabeel Shahzad
2018-03-20 19:40:19 -05:00
parent b9beb6c804
commit bb5bb4d4c7
25 changed files with 103 additions and 102 deletions

View File

@@ -25,7 +25,7 @@ class Aircraft extends Model
public $table = 'aircraft';
public $fillable = [
protected $fillable = [
'subfleet_id',
'airport_id',
'name',

View File

@@ -29,7 +29,7 @@ class Airline extends Model
*/
public $journal_type = JournalType::AIRLINE;
public $fillable = [
protected $fillable = [
'icao',
'iata',
'name',

View File

@@ -21,7 +21,7 @@ class Airport extends Model
public $timestamps = false;
public $incrementing = false;
public $fillable = [
protected $fillable = [
'id',
'iata',
'icao',

View File

@@ -15,7 +15,7 @@ class Award extends Model
{
public $table = 'awards';
public $fillable = [
protected $fillable = [
'name',
'description',
'image_url',

View File

@@ -11,7 +11,7 @@ class Bid extends Model
{
public $table = 'bids';
public $fillable = [
protected $fillable = [
'user_id',
'flight_id',
];

View File

@@ -16,7 +16,7 @@ class Expense extends Model
{
public $table = 'expenses';
public $fillable = [
protected $fillable = [
'airline_id',
'name',
'amount',

View File

@@ -15,7 +15,7 @@ class Fare extends Model
{
public $table = 'fares';
public $fillable = [
protected $fillable = [
'code',
'name',
'price',

View File

@@ -27,7 +27,7 @@ class Flight extends Model
/** The form wants this */
public $hours, $minutes;
public $fillable = [
protected $fillable = [
'id',
'airline_id',
'flight_number',

View File

@@ -15,7 +15,7 @@ class FlightField extends Model
public $table = 'flight_fields';
public $timestamps = false;
public $fillable = [
protected $fillable = [
'name',
'slug',
'required',

View File

@@ -15,7 +15,7 @@ class FlightFieldValue extends Model
{
public $table = 'flight_field_values';
public $fillable = [
protected $fillable = [
'flight_id',
'name',
'value',

View File

@@ -26,7 +26,7 @@ class Journal extends Model
{
protected $table = 'journals';
public $fillable = [
protected $fillable = [
'ledger_id',
'journal_type',
'balance',

View File

@@ -26,7 +26,7 @@ class JournalTransaction extends Model
public $incrementing = false;
public $fillable = [
protected $fillable = [
'transaction_group',
'journal_id',
'credit',

View File

@@ -21,7 +21,7 @@ use Carbon\Carbon;
*/
class Ledger extends Model
{
protected $table = 'ledgers';
public $table = 'ledgers';
/**
*

View File

@@ -11,10 +11,11 @@ use App\Interfaces\Model;
class Navdata extends Model
{
public $table = 'navdata';
public $timestamps = false;
public $incrementing = false;
public $fillable = [
protected $fillable = [
'id',
'name',
'type',
@@ -23,7 +24,7 @@ class Navdata extends Model
'freq',
];
public $casts = [
protected $casts = [
'type' => 'integer',
'lat' => 'float',
'lon' => 'float',

View File

@@ -12,7 +12,7 @@ class News extends Model
{
public $table = 'news';
public $fillable = [
protected $fillable = [
'user_id',
'subject',
'body',

View File

@@ -40,7 +40,7 @@ class Pirep extends Model
/** The form wants this */
public $hours, $minutes;
public $fillable = [
protected $fillable = [
'id',
'user_id',
'airline_id',

View File

@@ -13,7 +13,7 @@ class PirepComment extends Model
{
public $table = 'pirep_comments';
public $fillable = [
protected $fillable = [
'pirep_id',
'user_id',
'comment',

View File

@@ -13,7 +13,7 @@ class PirepFare extends Model
public $table = 'pirep_fares';
public $timestamps = false;
public $fillable = [
protected $fillable = [
'pirep_id',
'fare_id',
'count',

View File

@@ -15,7 +15,7 @@ class PirepField extends Model
public $table = 'pirep_fields';
public $timestamps = false;
public $fillable = [
protected $fillable = [
'name',
'slug',
'required',

View File

@@ -12,7 +12,7 @@ class PirepFieldValues extends Model
{
public $table = 'pirep_field_values';
public $fillable = [
protected $fillable = [
'pirep_id',
'name',
'value',

View File

@@ -15,7 +15,7 @@ class Rank extends Model
{
public $table = 'ranks';
public $fillable = [
protected $fillable = [
'name',
'hours',
'image_url',

View File

@@ -21,7 +21,7 @@ class Setting extends Model
public $table = 'settings';
public $incrementing = false;
public $fillable = [
protected $fillable = [
'name',
'key',
'value',

View File

@@ -19,7 +19,7 @@ class Subfleet extends Model
public $table = 'subfleets';
protected $fillable = [
public $fillable = [
'airline_id',
'type',
'name',
@@ -30,7 +30,7 @@ class Subfleet extends Model
'gross_weight',
];
protected $casts = [
public $casts = [
'airline_id' => 'integer',
'fuel_type' => 'integer',
'ground_handling_multiplier' => 'float',
@@ -39,7 +39,7 @@ class Subfleet extends Model
'gross_weight' => 'float',
];
protected static $rules = [
public static $rules = [
'type' => 'required|unique',
'name' => 'required',
'ground_handling_multiplier' => 'nullable|numeric',

View File

@@ -12,7 +12,7 @@ class UserAward extends Model
{
public $table = 'user_awards';
public $fillable = [
protected $fillable = [
'user_id',
'award_id'
];