A set of plugins to help on managing geographic information

This commit is contained in:
ahwelp
2023-01-24 20:41:37 +00:00
parent 616a97f16c
commit a60cfcec3a
61 changed files with 7895 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace App\Geo\Postal\Classes;
use ORM\Entity as Entity;
use App\Geo\City\Classes\City as City;
use App\Geo\Zone\Classes\Zone as Zone;
use App\Geo\State\Classes\State as State;
use App\Geo\Country\Classes\Country as Country;
class Postal extends Entity {
//const _idPolice = Array("type" => "", "min" => 0, "max" => 100000, "step" => 2);
const _tableName = "geo_postals";
/* const _properties = Array(
"id" => ['listable' => true, 'searcheble' => false, 'orderable' => false],
"name" => ['listable' => true, 'searcheble' => true]);
*/
//const _timestamps = true;
//const _softdelete = true;
//const _connectionName = "";
public function country() {
return $this->belongsTo(Country::class, 'country_id', 'id', $this);
}
public function state() {
return $this->belongsTo(State::class, 'state_id', 'id', $this);
}
public function city() {
return $this->belongsTo(City::class, 'city_id', 'id', $this);
}
public function zone() {
return $this->belongsTo(Zone::class, 'zone_id', 'id', $this);
}
}