first standalone plugin commit
This commit is contained in:
55
src/Model/Entity/Address.php
Normal file
55
src/Model/Entity/Address.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeAddresses\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* Address Entity
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $address_name
|
||||
* @property string|null $contact_name
|
||||
* @property string $address_line1
|
||||
* @property string|null $address_line2
|
||||
* @property int|null $city_id
|
||||
* @property int|null $state_id
|
||||
* @property string $postal_code
|
||||
* @property int|null $country_id
|
||||
* @property string|null $phone_number
|
||||
* @property string|null $email
|
||||
* @property string|null $notes
|
||||
*
|
||||
* @property \CakeAddresses\Model\Entity\City $city
|
||||
* @property \CakeAddresses\Model\Entity\State $state
|
||||
* @property \CakeAddresses\Model\Entity\Country $country
|
||||
*/
|
||||
class Address extends Entity
|
||||
{
|
||||
/**
|
||||
* Fields that can be mass assigned using newEntity() or patchEntity().
|
||||
*
|
||||
* Note that when '*' is set to true, this allows all unspecified fields to
|
||||
* be mass assigned. For security purposes, it is advised to set '*' to false
|
||||
* (or remove it), and explicitly make individual fields accessible as needed.
|
||||
*
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $_accessible = [
|
||||
'address_name' => true,
|
||||
'contact_name' => true,
|
||||
'address_line1' => true,
|
||||
'address_line2' => true,
|
||||
'city' => true,
|
||||
'city_id' => true,
|
||||
'state' => true,
|
||||
'state_id' => true,
|
||||
'postal_code' => true,
|
||||
'country' => true,
|
||||
'country_id' => true,
|
||||
'phone_number' => true,
|
||||
'email' => true,
|
||||
'notes' => true,
|
||||
];
|
||||
}
|
||||
55
src/Model/Entity/City.php
Normal file
55
src/Model/Entity/City.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeAddresses\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* City Entity
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $state_id
|
||||
* @property string $state_code
|
||||
* @property int $country_id
|
||||
* @property string $country_code
|
||||
* @property string $latitude
|
||||
* @property string $longitude
|
||||
* @property \Cake\I18n\DateTime $created_at
|
||||
* @property \Cake\I18n\DateTime $updated_at
|
||||
* @property bool $flag
|
||||
* @property string|null $wikiDataId
|
||||
*
|
||||
* @property \CakeAddresses\Model\Entity\State $state
|
||||
* @property \CakeAddresses\Model\Entity\Country $country
|
||||
* @property \CakeAddresses\Model\Entity\Address[] $addresses
|
||||
*/
|
||||
class City extends Entity
|
||||
{
|
||||
/**
|
||||
* Fields that can be mass assigned using newEntity() or patchEntity().
|
||||
*
|
||||
* Note that when '*' is set to true, this allows all unspecified fields to
|
||||
* be mass assigned. For security purposes, it is advised to set '*' to false
|
||||
* (or remove it), and explicitly make individual fields accessible as needed.
|
||||
*
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $_accessible = [
|
||||
'name' => true,
|
||||
'state_id' => true,
|
||||
'state_code' => true,
|
||||
'country_id' => true,
|
||||
'country_code' => true,
|
||||
'latitude' => true,
|
||||
'longitude' => true,
|
||||
'created_at' => true,
|
||||
'updated_at' => true,
|
||||
'flag' => true,
|
||||
'wikiDataId' => true,
|
||||
'state' => true,
|
||||
'country' => true,
|
||||
'addresses' => true,
|
||||
];
|
||||
}
|
||||
85
src/Model/Entity/Country.php
Normal file
85
src/Model/Entity/Country.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeAddresses\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* Country Entity
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string|null $iso3
|
||||
* @property string|null $numeric_code
|
||||
* @property string|null $iso2
|
||||
* @property string|null $phonecode
|
||||
* @property string|null $capital
|
||||
* @property string|null $currency
|
||||
* @property string|null $currency_name
|
||||
* @property string|null $currency_symbol
|
||||
* @property string|null $tld
|
||||
* @property string|null $native
|
||||
* @property int|null $region_id
|
||||
* @property int|null $subregion_id
|
||||
* @property string|null $nationality
|
||||
* @property string|null $timezones
|
||||
* @property string|null $translations
|
||||
* @property string|null $latitude
|
||||
* @property string|null $longitude
|
||||
* @property string|null $emoji
|
||||
* @property string|null $emojiU
|
||||
* @property \Cake\I18n\DateTime|null $created_at
|
||||
* @property \Cake\I18n\DateTime $updated_at
|
||||
* @property bool $flag
|
||||
* @property string|null $wikiDataId
|
||||
*
|
||||
* @property \CakeAddresses\Model\Entity\Region $region
|
||||
* @property \CakeAddresses\Model\Entity\Subregion $subregion
|
||||
* @property \CakeAddresses\Model\Entity\Address[] $addresses
|
||||
* @property \CakeAddresses\Model\Entity\City[] $cities
|
||||
* @property \CakeAddresses\Model\Entity\State[] $states
|
||||
*/
|
||||
class Country extends Entity
|
||||
{
|
||||
/**
|
||||
* Fields that can be mass assigned using newEntity() or patchEntity().
|
||||
*
|
||||
* Note that when '*' is set to true, this allows all unspecified fields to
|
||||
* be mass assigned. For security purposes, it is advised to set '*' to false
|
||||
* (or remove it), and explicitly make individual fields accessible as needed.
|
||||
*
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $_accessible = [
|
||||
'name' => true,
|
||||
'iso3' => true,
|
||||
'numeric_code' => true,
|
||||
'iso2' => true,
|
||||
'phonecode' => true,
|
||||
'capital' => true,
|
||||
'currency' => true,
|
||||
'currency_name' => true,
|
||||
'currency_symbol' => true,
|
||||
'tld' => true,
|
||||
'native' => true,
|
||||
'region' => true,
|
||||
'region_id' => true,
|
||||
'subregion' => true,
|
||||
'subregion_id' => true,
|
||||
'nationality' => true,
|
||||
'timezones' => true,
|
||||
'translations' => true,
|
||||
'latitude' => true,
|
||||
'longitude' => true,
|
||||
'emoji' => true,
|
||||
'emojiU' => true,
|
||||
'created_at' => true,
|
||||
'updated_at' => true,
|
||||
'flag' => true,
|
||||
'wikiDataId' => true,
|
||||
'addresses' => true,
|
||||
'cities' => true,
|
||||
'states' => true,
|
||||
];
|
||||
}
|
||||
43
src/Model/Entity/Region.php
Normal file
43
src/Model/Entity/Region.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeAddresses\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* Region Entity
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string|null $translations
|
||||
* @property \Cake\I18n\DateTime|null $created_at
|
||||
* @property \Cake\I18n\DateTime $updated_at
|
||||
* @property bool $flag
|
||||
* @property string|null $wikiDataId
|
||||
*
|
||||
* @property \CakeAddresses\Model\Entity\Country[] $countries
|
||||
* @property \CakeAddresses\Model\Entity\Subregion[] $subregions
|
||||
*/
|
||||
class Region extends Entity
|
||||
{
|
||||
/**
|
||||
* Fields that can be mass assigned using newEntity() or patchEntity().
|
||||
*
|
||||
* Note that when '*' is set to true, this allows all unspecified fields to
|
||||
* be mass assigned. For security purposes, it is advised to set '*' to false
|
||||
* (or remove it), and explicitly make individual fields accessible as needed.
|
||||
*
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $_accessible = [
|
||||
'name' => true,
|
||||
'translations' => true,
|
||||
'created_at' => true,
|
||||
'updated_at' => true,
|
||||
'flag' => true,
|
||||
'wikiDataId' => true,
|
||||
'countries' => true,
|
||||
'subregions' => true,
|
||||
];
|
||||
}
|
||||
57
src/Model/Entity/State.php
Normal file
57
src/Model/Entity/State.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeAddresses\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* State Entity
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $country_id
|
||||
* @property string $country_code
|
||||
* @property string|null $fips_code
|
||||
* @property string|null $iso2
|
||||
* @property string|null $type
|
||||
* @property string|null $latitude
|
||||
* @property string|null $longitude
|
||||
* @property \Cake\I18n\DateTime|null $created_at
|
||||
* @property \Cake\I18n\DateTime $updated_at
|
||||
* @property bool $flag
|
||||
* @property string|null $wikiDataId
|
||||
*
|
||||
* @property \CakeAddresses\Model\Entity\Country $country
|
||||
* @property \CakeAddresses\Model\Entity\Address[] $addresses
|
||||
* @property \CakeAddresses\Model\Entity\City[] $cities
|
||||
*/
|
||||
class State extends Entity
|
||||
{
|
||||
/**
|
||||
* Fields that can be mass assigned using newEntity() or patchEntity().
|
||||
*
|
||||
* Note that when '*' is set to true, this allows all unspecified fields to
|
||||
* be mass assigned. For security purposes, it is advised to set '*' to false
|
||||
* (or remove it), and explicitly make individual fields accessible as needed.
|
||||
*
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $_accessible = [
|
||||
'name' => true,
|
||||
'country_id' => true,
|
||||
'country_code' => true,
|
||||
'fips_code' => true,
|
||||
'iso2' => true,
|
||||
'type' => true,
|
||||
'latitude' => true,
|
||||
'longitude' => true,
|
||||
'created_at' => true,
|
||||
'updated_at' => true,
|
||||
'flag' => true,
|
||||
'wikiDataId' => true,
|
||||
'country' => true,
|
||||
'addresses' => true,
|
||||
'cities' => true,
|
||||
];
|
||||
}
|
||||
45
src/Model/Entity/Subregion.php
Normal file
45
src/Model/Entity/Subregion.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeAddresses\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* Subregion Entity
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string|null $translations
|
||||
* @property int $region_id
|
||||
* @property \Cake\I18n\DateTime|null $created_at
|
||||
* @property \Cake\I18n\DateTime $updated_at
|
||||
* @property bool $flag
|
||||
* @property string|null $wikiDataId
|
||||
*
|
||||
* @property \CakeAddresses\Model\Entity\Region $region
|
||||
* @property \CakeAddresses\Model\Entity\Country[] $countries
|
||||
*/
|
||||
class Subregion extends Entity
|
||||
{
|
||||
/**
|
||||
* Fields that can be mass assigned using newEntity() or patchEntity().
|
||||
*
|
||||
* Note that when '*' is set to true, this allows all unspecified fields to
|
||||
* be mass assigned. For security purposes, it is advised to set '*' to false
|
||||
* (or remove it), and explicitly make individual fields accessible as needed.
|
||||
*
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $_accessible = [
|
||||
'name' => true,
|
||||
'translations' => true,
|
||||
'region_id' => true,
|
||||
'created_at' => true,
|
||||
'updated_at' => true,
|
||||
'flag' => true,
|
||||
'wikiDataId' => true,
|
||||
'region' => true,
|
||||
'countries' => true,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user