2021-08-04 17:42:26 +02:00

40 lines
883 B
PHP

<?php namespace GermanAirlinesVa\Fleet\Models;
use Model;
/**
* Model
*/
class Aircraft 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 = 'aircrafts';
protected $connection = 'germanairlinesva_fleet';
/**
* @var array Validation rules
*/
public $rules = [
'aircraft_type' => 'required',
'registration' => 'required',
'name' => 'required',
'home_airport_id' => 'required',
];
public $belongsTo = [
'aircraft_type' => 'GermanAirlinesVa\Fleet\Models\AircraftType',
'home_airport' => 'GermanAirlinesVa\Routes\Models\Airport',
'airport' => 'GermanAirlinesVa\Routes\Models\Airport',
];
}