2021-08-05 01:22:34 +02:00

37 lines
801 B
PHP

<?php namespace GermanAirlinesVa\Routes\Models;
use Model;
/**
* Model
*/
class Alternate 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 = 'alternates';
protected $connection = 'germanairlinesva_routes';
/**
* @var array Validation rules
*/
public $rules = [
'airport_id' => 'required',
'alternate_id' => 'required',
];
public $belongsTo = [
'airport' => ['GermanAirlinesVa\Routes\Models\Airport', 'key' => 'airport_id'],
'alternate' => ['GermanAirlinesVa\Routes\Models\Airport', 'key' => 'alternate_id'],
];
}