mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-02-09 13:28:43 +00:00
PhpUnit fixes
This commit is contained in:
parent
1bb6695fa1
commit
be2ff1cd27
|
|
@ -50,11 +50,11 @@ class Installer extends InstallerAbstract
|
||||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'clientmgmt_client` (
|
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'clientmgmt_client` (
|
||||||
`clientmgmt_client_id` int(11) NOT NULL AUTO_INCREMENT,
|
`clientmgmt_client_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`clientmgmt_client_no` int(11) NOT NULL,
|
`clientmgmt_client_no` int(11) NOT NULL,
|
||||||
`clientmgmt_client_no_reverse` int(11) NOT NULL,
|
`clientmgmt_client_no_reverse` varchar(25) DEFAULT NULL,
|
||||||
`clientmgmt_client_status` tinyint(2) NOT NULL,
|
`clientmgmt_client_status` tinyint(2) NOT NULL,
|
||||||
`clientmgmt_client_type` tinyint(2) NOT NULL,
|
`clientmgmt_client_type` tinyint(2) NOT NULL,
|
||||||
`clientmgmt_client_taxid` varchar(50) NOT NULL,
|
`clientmgmt_client_taxid` varchar(50) DEFAULT NULL,
|
||||||
`clientmgmt_client_info` text NOT NULL,
|
`clientmgmt_client_info` text DEFAULT NULL,
|
||||||
`clientmgmt_client_created_at` datetime NOT NULL,
|
`clientmgmt_client_created_at` datetime NOT NULL,
|
||||||
`clientmgmt_client_account` int(11) NOT NULL,
|
`clientmgmt_client_account` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`clientmgmt_client_id`),
|
PRIMARY KEY (`clientmgmt_client_id`),
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ class Client
|
||||||
|
|
||||||
public function setInfo(string $info) /* : void */
|
public function setInfo(string $info) /* : void */
|
||||||
{
|
{
|
||||||
return $this->info;
|
$this->info = $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCreatedAt() : \DateTime
|
public function getCreatedAt() : \DateTime
|
||||||
|
|
@ -136,14 +136,14 @@ class Client
|
||||||
return $this->createdAt;
|
return $this->createdAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getProfile() : Account
|
public function getProfile() : Profile
|
||||||
{
|
{
|
||||||
return $this->profile;
|
return $this->profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setProfile(Account $account) /* : void */
|
public function setProfile(Profile $profile) /* : void */
|
||||||
{
|
{
|
||||||
$this->profile = $account;
|
$this->profile = $profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFiles() : array
|
public function getFiles() : array
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class ClientMapper extends DataMapperAbstract
|
||||||
'clientmgmt_client_type' => ['name' => 'clientmgmt_client_type', 'type' => 'int', 'internal' => 'type'],
|
'clientmgmt_client_type' => ['name' => 'clientmgmt_client_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
'clientmgmt_client_taxid' => ['name' => 'clientmgmt_client_taxid', 'type' => 'string', 'internal' => 'taxId'],
|
'clientmgmt_client_taxid' => ['name' => 'clientmgmt_client_taxid', 'type' => 'string', 'internal' => 'taxId'],
|
||||||
'clientmgmt_client_info' => ['name' => 'clientmgmt_client_info', 'type' => 'string', 'internal' => 'info'],
|
'clientmgmt_client_info' => ['name' => 'clientmgmt_client_info', 'type' => 'string', 'internal' => 'info'],
|
||||||
'clientmgmt_client_at' => ['name' => 'clientmgmt_client_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
'clientmgmt_client_created_at' => ['name' => 'clientmgmt_client_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
||||||
'clientmgmt_client_account' => ['name' => 'clientmgmt_client_account', 'type' => 'int', 'internal' => 'profile'],
|
'clientmgmt_client_account' => ['name' => 'clientmgmt_client_account', 'type' => 'int', 'internal' => 'profile'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@ class ClientMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'clientmgmt_client_at';
|
protected static $createdAt = 'clientmgmt_client_created_at';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Has one relation.
|
* Has one relation.
|
||||||
|
|
@ -90,7 +90,7 @@ class ClientMapper extends DataMapperAbstract
|
||||||
'dst' => 'clientmgmt_client_media_dst',
|
'dst' => 'clientmgmt_client_media_dst',
|
||||||
'src' => 'clientmgmt_client_media_src',
|
'src' => 'clientmgmt_client_media_src',
|
||||||
],
|
],
|
||||||
'contact' => [
|
'contactElements' => [
|
||||||
'mapper' => ContactElementMapper::class,
|
'mapper' => ContactElementMapper::class,
|
||||||
'table' => 'clientmgmt_client_contactelement',
|
'table' => 'clientmgmt_client_contactelement',
|
||||||
'dst' => 'clientmgmt_client_contactelement_dst',
|
'dst' => 'clientmgmt_client_contactelement_dst',
|
||||||
|
|
@ -113,6 +113,11 @@ class ClientMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$objId = parent::create($obj, $relations);
|
$objId = parent::create($obj, $relations);
|
||||||
|
|
||||||
|
if($objId === null || !is_scalar($objId)) {
|
||||||
|
return $objId;
|
||||||
|
}
|
||||||
|
|
||||||
$query = new Builder(self::$db);
|
$query = new Builder(self::$db);
|
||||||
|
|
||||||
$query->prefix(self::$db->getPrefix())
|
$query->prefix(self::$db->getPrefix())
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@
|
||||||
"description": "The buisness module.",
|
"description": "The buisness module.",
|
||||||
"directory": "ClientManagement",
|
"directory": "ClientManagement",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Admin" : "1.0.0"
|
"Admin" : "1.0.0",
|
||||||
|
"Profile" : "1.0.0",
|
||||||
|
"Media" : "1.0.0"
|
||||||
},
|
},
|
||||||
"providing": {
|
"providing": {
|
||||||
"Navigation": "*"
|
"Navigation": "*"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user