mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 00:13:59 +00:00
large commit
This commit is contained in:
@@ -2,17 +2,15 @@
|
||||
|
||||
namespace App\Classes\Modules\Contacts\DataTransferObjects;
|
||||
|
||||
use App\Classes\Interfaces\DataTransferObject;
|
||||
use App\Classes\General\Interfaces\DataTransferObject;
|
||||
use App\Classes\ValueObjects\Constants\Countries;
|
||||
|
||||
class ContactObject implements DataTransferObject
|
||||
{
|
||||
/** @var int|null */
|
||||
private $country_id;
|
||||
/** @var int */
|
||||
private $companyId;
|
||||
|
||||
/** @var int|null */
|
||||
private $company_id;
|
||||
|
||||
/** @var string|null */
|
||||
/** @var string */
|
||||
private $reference;
|
||||
|
||||
/** @var string|null */
|
||||
@@ -24,59 +22,46 @@ class ContactObject implements DataTransferObject
|
||||
/** @var string|null */
|
||||
private $wechat_id;
|
||||
|
||||
/** @var int|null */
|
||||
private $countryId;
|
||||
|
||||
/**
|
||||
* ContactObject constructor.
|
||||
* @param int|null $country_id
|
||||
* @param int|null $company_id
|
||||
* @param null|string $reference
|
||||
* @param int $companyId
|
||||
* @param string $reference
|
||||
* @param null|string $phone
|
||||
* @param null|string $email
|
||||
* @param null|string $wechat_id
|
||||
* @param int|null $countryId
|
||||
*/
|
||||
public function __construct(
|
||||
?int $country_id,
|
||||
?int $company_id,
|
||||
?string $reference,
|
||||
?string $phone,
|
||||
?string $email,
|
||||
?string $wechat_id
|
||||
)
|
||||
public function __construct(int $companyId, string $reference, ?string $phone, ?string $email, ?string $wechat_id, ?int $countryId = Countries::MALAYSIA)
|
||||
{
|
||||
$this->country_id = $country_id;
|
||||
$this->company_id = $company_id;
|
||||
$this->companyId = $companyId;
|
||||
$this->reference = $reference;
|
||||
$this->phone = $phone;
|
||||
$this->email = $email;
|
||||
$this->wechat_id = $wechat_id;
|
||||
$this->countryId = $countryId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
* @return int
|
||||
*/
|
||||
public function getCountryId(): ?int
|
||||
public function getCompanyId(): int
|
||||
{
|
||||
return $this->country_id;
|
||||
return $this->companyId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
* @return string
|
||||
*/
|
||||
public function getCompanyId(): ?int
|
||||
{
|
||||
return $this->company_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getReference(): ?string
|
||||
public function getReference(): string
|
||||
{
|
||||
return $this->reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
* @return null|string
|
||||
*/
|
||||
public function getPhone(): ?string
|
||||
{
|
||||
@@ -84,7 +69,7 @@ class ContactObject implements DataTransferObject
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
* @return null|string
|
||||
*/
|
||||
public function getEmail(): ?string
|
||||
{
|
||||
@@ -92,10 +77,22 @@ class ContactObject implements DataTransferObject
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
* @return null|string
|
||||
*/
|
||||
public function getWeChatId(): ?string
|
||||
public function getWechatId(): ?string
|
||||
{
|
||||
return $this->wechat_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getCountryId(): int
|
||||
{
|
||||
return $this->countryId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user