Mapper/Module/Schema fixes thanks to new tests

This commit is contained in:
Dennis Eichhorn 2019-02-26 00:00:31 +01:00
parent 16d0fdc7f1
commit dad56d79fa
2 changed files with 6 additions and 6 deletions

View File

@ -29,9 +29,9 @@ class Supplier
{
private $id = 0;
private $number = 0;
private $number = '';
private $numberReverse = 0;
private $numberReverse = '';
private $status = 0;
@ -51,7 +51,7 @@ class Supplier
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 Supplier
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 SupplierMapper extends DataMapperAbstract
*/
protected static $columns = [
'suppliermgmt_supplier_id' => ['name' => 'suppliermgmt_supplier_id', 'type' => 'int', 'internal' => 'id'],
'suppliermgmt_supplier_no' => ['name' => 'suppliermgmt_supplier_no', 'type' => 'int', 'internal' => 'number'],
'suppliermgmt_supplier_no' => ['name' => 'suppliermgmt_supplier_no', 'type' => 'string', 'internal' => 'number'],
'suppliermgmt_supplier_no_reverse' => ['name' => 'suppliermgmt_supplier_no_reverse', 'type' => 'string', 'internal' => 'numberReverse'],
'suppliermgmt_supplier_status' => ['name' => 'suppliermgmt_supplier_status', 'type' => 'int', 'internal' => 'status'],
'suppliermgmt_supplier_type' => ['name' => 'suppliermgmt_supplier_type', 'type' => 'int', 'internal' => 'type'],