Alternates

This commit is contained in:
2021-08-05 01:22:34 +02:00
parent 772231231d
commit 4fe5935e30
18 changed files with 316 additions and 2 deletions
+36
View File
@@ -0,0 +1,36 @@
<?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'],
];
}