Files
omair saleh 05401f6bbc large commit
2021-03-11 13:06:40 +08:00

98 lines
1.9 KiB
PHP

<?php
namespace App\Classes\Modules\Contacts\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
use App\Classes\ValueObjects\Constants\Countries;
class ContactObject implements DataTransferObject
{
/** @var int */
private $companyId;
/** @var string */
private $reference;
/** @var string|null */
private $phone;
/** @var string|null */
private $email;
/** @var string|null */
private $wechat_id;
/** @var int|null */
private $countryId;
/**
* ContactObject constructor.
* @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 $companyId, string $reference, ?string $phone, ?string $email, ?string $wechat_id, ?int $countryId = Countries::MALAYSIA)
{
$this->companyId = $companyId;
$this->reference = $reference;
$this->phone = $phone;
$this->email = $email;
$this->wechat_id = $wechat_id;
$this->countryId = $countryId;
}
/**
* @return int
*/
public function getCompanyId(): int
{
return $this->companyId;
}
/**
* @return string
*/
public function getReference(): string
{
return $this->reference;
}
/**
* @return null|string
*/
public function getPhone(): ?string
{
return $this->phone;
}
/**
* @return null|string
*/
public function getEmail(): ?string
{
return $this->email;
}
/**
* @return null|string
*/
public function getWechatId(): ?string
{
return $this->wechat_id;
}
/**
* @return int
*/
public function getCountryId(): int
{
return $this->countryId;
}
}