From fe05196a1d6ef18647a90d6bbd373f832d79e4ef Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 28 Sep 2019 20:59:03 +0200 Subject: [PATCH] style fixes and time recording app draft --- Models/Client.php | 51 ++++++++++++++++++++++++++++++-------- Models/ClientMapper.php | 4 +-- Models/PermissionState.php | 4 +-- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/Models/Client.php b/Models/Client.php index 819afa7..7df2be3 100644 --- a/Models/Client.php +++ b/Models/Client.php @@ -27,29 +27,38 @@ use Modules\Profile\Models\Profile; */ class Client { - private $id = 0; + private int $id = 0; - private $number = ''; + private string $number = ''; - private $numberReverse = ''; + private string $numberReverse = ''; - private $status = 0; + private int $status = 0; - private $type = 0; + private int $type = 0; - private $taxId = 0; + private array $ids = []; - private $info = ''; + private string $info = ''; - private $createdAt = null; + private \DateTime $createdAt; private $profile = null; - private $files = []; + private array $files = []; - private $contactElements = []; + private array $contactElements = []; - private $address = []; + private array $address = []; + + private array $partners = []; + + private $salesRep = null; + + private int $advertisementMaterial = 0; + + private $defaultDeliveryAddress = null; + private $defaultInvoiceAddress = null; public function __construct() { @@ -116,6 +125,26 @@ class Client $this->taxId = $taxId; } + public function setDefaultDeliveryAddress($deliveryAddress) : void + { + $this->defaultDeliveryAddress = $deliveryAddress; + } + + public function getDefaultDeliveryAddress() + { + return $this->defaultDeliveryAddress; + } + + public function setDefaultInvoiceAddress($invoiceAddress) : void + { + $this->defaultTnvoiceAddress = $invoiceAddress; + } + + public function getDefaultInvoiceAddress() + { + return $this->defaultInvoiceAddress; + } + public function getInfo() : string { return $this->info; diff --git a/Models/ClientMapper.php b/Models/ClientMapper.php index 0447286..cfd7cf5 100644 --- a/Models/ClientMapper.php +++ b/Models/ClientMapper.php @@ -5,7 +5,7 @@ * * PHP Version 7.4 * - * @package Modules\ClientManagement + * @package Modules\ClientManagement\Models * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 @@ -24,7 +24,7 @@ use phpOMS\DataStorage\Database\Query\Column; /** * Client mapper class. * - * @package Modules\ClientManagement + * @package Modules\ClientManagement\Models * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0 diff --git a/Models/PermissionState.php b/Models/PermissionState.php index 3f92583..86ac71d 100644 --- a/Models/PermissionState.php +++ b/Models/PermissionState.php @@ -4,7 +4,7 @@ * * PHP Version 7.4 * - * @package Modules\ClientManagement + * @package Modules\ClientManagement\Models * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 @@ -19,7 +19,7 @@ use phpOMS\Stdlib\Base\Enum; /** * Permision state enum. * - * @package Modules\ClientManagement + * @package Modules\ClientManagement\Models * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0