mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-02-09 21:38:43 +00:00
Profile mapper/test implemented
This commit is contained in:
parent
165f2740d3
commit
1bb6695fa1
|
|
@ -17,7 +17,7 @@ declare(strict_types = 1);
|
||||||
namespace Modules\ClientManagement\Models;
|
namespace Modules\ClientManagement\Models;
|
||||||
|
|
||||||
use Modules\Media\Models\Media;
|
use Modules\Media\Models\Media;
|
||||||
use Modules\Profile\Models\Account;
|
use Modules\Profile\Models\Profile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account class.
|
* Account class.
|
||||||
|
|
@ -59,7 +59,7 @@ class Client
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
$this->createdAt = new \DateTime('now');
|
$this->createdAt = new \DateTime('now');
|
||||||
$this->profile = new Account();
|
$this->profile = new Profile();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getId() : int
|
public function getId() : int
|
||||||
|
|
@ -136,12 +136,12 @@ class Client
|
||||||
return $this->createdAt;
|
return $this->createdAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAccount() : Account
|
public function getProfile() : Account
|
||||||
{
|
{
|
||||||
return $this->profile;
|
return $this->profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAccount(Account $account) /* : void */
|
public function setProfile(Account $account) /* : void */
|
||||||
{
|
{
|
||||||
$this->profile = $account;
|
$this->profile = $account;
|
||||||
}
|
}
|
||||||
|
|
@ -165,9 +165,4 @@ class Client
|
||||||
{
|
{
|
||||||
return $this->contactElements;
|
return $this->contactElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getProfile() : Account
|
|
||||||
{
|
|
||||||
return $this->profile;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\ClientManagement\Models;
|
namespace Modules\ClientManagement\Models;
|
||||||
|
|
||||||
use Modules\Media\Models\MediaMapper;
|
use Modules\Media\Models\MediaMapper;
|
||||||
use Modules\Profile\Models\AccountMapper;
|
use Modules\Profile\Models\ProfileMapper;
|
||||||
use Modules\Profile\Models\ContactElement;
|
use Modules\Profile\Models\ContactElement;
|
||||||
use Modules\Profile\Models\ContactElementMapper;
|
use Modules\Profile\Models\ContactElementMapper;
|
||||||
use Modules\Profile\Models\ContactMapper;
|
use Modules\Profile\Models\ContactMapper;
|
||||||
|
|
@ -78,7 +78,7 @@ class ClientMapper extends DataMapperAbstract
|
||||||
*/
|
*/
|
||||||
protected static $ownsOne = [
|
protected static $ownsOne = [
|
||||||
'profile' => [
|
'profile' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => ProfileMapper::class,
|
||||||
'src' => 'clientmgmt_client_account',
|
'src' => 'clientmgmt_client_account',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user