Mapper/Module/Schema fixes thanks to new tests

This commit is contained in:
Dennis Eichhorn 2019-02-26 00:00:31 +01:00
parent 1102b0b993
commit 8629f0155e
2 changed files with 6 additions and 6 deletions

View File

@ -29,9 +29,9 @@ class Client
{
private $id = 0;
private $number = 0;
private $number = '';
private $numberReverse = 0;
private $numberReverse = '';
private $status = 0;
@ -51,7 +51,7 @@ class Client
private $address = [];
public function __construct(int $id = 0)
public function __construct()
{
$this->createdAt = new \DateTime('now');
$this->profile = new Profile();
@ -62,12 +62,12 @@ class Client
return $this->id;
}
public function getNumber() : int
public function getNumber() : string
{
return $this->number;
}
public function setNumber(int $number) : void
public function setNumber(string $number) : void
{
$this->number = $number;
}

View File

@ -30,7 +30,7 @@ final class ClientMapper extends DataMapperAbstract
*/
protected static $columns = [
'clientmgmt_client_id' => ['name' => 'clientmgmt_client_id', 'type' => 'int', 'internal' => 'id'],
'clientmgmt_client_no' => ['name' => 'clientmgmt_client_no', 'type' => 'int', 'internal' => 'number'],
'clientmgmt_client_no' => ['name' => 'clientmgmt_client_no', 'type' => 'string', 'internal' => 'number'],
'clientmgmt_client_no_reverse' => ['name' => 'clientmgmt_client_no_reverse', 'type' => 'string', 'internal' => 'numberReverse'],
'clientmgmt_client_status' => ['name' => 'clientmgmt_client_status', 'type' => 'int', 'internal' => 'status'],
'clientmgmt_client_type' => ['name' => 'clientmgmt_client_type', 'type' => 'int', 'internal' => 'type'],