Airports Model/Controller

This commit is contained in:
Your Name
2021-08-04 16:38:31 +02:00
parent 9db5f1b5e3
commit c84c826c3f
14 changed files with 309 additions and 3 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php namespace GermanAirlinesVa\Routes\Models;
use Model;
/**
* Model
*/
class Airport 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 = 'airports';
protected $connection = 'germanairlinesva_routes';
/**
* @var array Validation rules
*/
public $rules = [
'iata' => 'required',
'icao' => 'required',
'name' => 'required',
'country' => 'required',
'elevation' => 'required',
'latitude' => 'required',
'longitude' => 'required',
];
}
+25
View File
@@ -0,0 +1,25 @@
columns:
id:
label: id
type: number
iata:
label: iata
type: text
icao:
label: icao
type: text
name:
label: name
type: text
country:
label: country
type: text
elevation:
label: elevation
type: text
latitude:
label: latitude
type: text
longitude:
label: longitude
type: text
+36
View File
@@ -0,0 +1,36 @@
fields:
iata:
label: 'germanairlinesva.routes::lang.airports.iata'
span: auto
required: 1
type: text
icao:
label: 'germanairlinesva.routes::lang.airports.icao'
span: auto
required: 1
type: text
name:
label: 'germanairlinesva.routes::lang.airports.name'
span: auto
required: 1
type: text
country:
label: 'germanairlinesva.routes::lang.airports.country'
span: auto
required: 1
type: text
elevation:
label: 'germanairlinesva.routes::lang.airports.elevation'
span: auto
required: 1
type: text
latitude:
label: 'germanairlinesva.routes::lang.airports.latitude'
span: auto
required: 1
type: text
longitude:
label: 'germanairlinesva.routes::lang.airports.longitude'
span: auto
required: 1
type: text