66 lines
1.6 KiB
PHP
66 lines
1.6 KiB
PHP
<?php namespace GermanAirlinesVa\Fleet\Models;
|
|
|
|
use Model;
|
|
|
|
/**
|
|
* Model
|
|
*/
|
|
class AircraftType extends Model
|
|
{
|
|
use \October\Rain\Database\Traits\Validation;
|
|
|
|
/*
|
|
* Disable timestamps by default.
|
|
* Remove this line if timestamps are defined in the database table.
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* @var string The database table used by the model.
|
|
*/
|
|
public $table = 'aircraft_types';
|
|
protected $connection = 'germanairlinesva_fleet';
|
|
|
|
/**
|
|
* @var array Validation rules
|
|
*/
|
|
public $rules = [
|
|
'aircraft_manufacturer_id' => 'required',
|
|
'typerating_id' => 'required',
|
|
'only_charter' => 'required',
|
|
'type' => 'required',
|
|
'simbrief_type' => 'required',
|
|
'aircraft_type_groups' => 'required',
|
|
'dom' => 'required',
|
|
'mpld' => 'required',
|
|
'mzfm' => 'required',
|
|
'fuel_capacity' => 'required',
|
|
'mtom' => 'required',
|
|
'mlam' => 'required',
|
|
'description' => 'required',
|
|
'wingspan' => 'required',
|
|
'length' => 'required',
|
|
'cruise_speed' => 'required',
|
|
'range' => 'required',
|
|
'engines' => 'required',
|
|
'max_fl' => 'required',
|
|
'capacity_flight_crew' => 'required',
|
|
'capacity_cabin_crew' => 'required',
|
|
'capacity_passengers' => 'required',
|
|
'capacity_cargo' => 'required',
|
|
];
|
|
|
|
public $belongsTo = [
|
|
'aircraft_manufacturer' => 'GermanAirlinesVa\Fleet\Models\AircraftManufacturer',
|
|
'typerating' => 'GermanAirlinesVa\Schooling\Models\Typerating',
|
|
];
|
|
|
|
public $belongsToMany = [
|
|
'aircraft_type_groups' => 'GermanAirlinesVa\Fleet\Models\AircraftTypeGroup',
|
|
];
|
|
|
|
public $hasMany = [
|
|
'aircrafts' => 'GermanAirlinesVa\Fleet\Models\Aircraft',
|
|
];
|
|
}
|