mirror of
https://github.com/Karaka-Management/oms-ItemManagement.git
synced 2026-02-15 19:58:40 +00:00
PhpUnit fixes
This commit is contained in:
parent
bdc0a2e6f3
commit
4d6c4aa9a8
|
|
@ -71,6 +71,7 @@ class Installer extends InstallerAbstract
|
||||||
`itemreference_segmentation_l11n_id` int(11) NOT NULL AUTO_INCREMENT,
|
`itemreference_segmentation_l11n_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`itemreference_segmentation_no` varchar(30) DEFAULT NULL,
|
`itemreference_segmentation_no` varchar(30) DEFAULT NULL,
|
||||||
`itemreference_segmentation_name` varchar(30) DEFAULT NULL,
|
`itemreference_segmentation_name` varchar(30) DEFAULT NULL,
|
||||||
|
`itemreference_segmentation_language` varchar(30) DEFAULT NULL,
|
||||||
PRIMARY KEY (`itemreference_segmentation_l11n_id`)
|
PRIMARY KEY (`itemreference_segmentation_l11n_id`)
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||||
)->execute();
|
)->execute();
|
||||||
|
|
@ -80,16 +81,7 @@ class Installer extends InstallerAbstract
|
||||||
`itemreference_media_id` int(11) NOT NULL AUTO_INCREMENT,
|
`itemreference_media_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`itemreference_media_item` int(11) DEFAULT NULL,
|
`itemreference_media_item` int(11) DEFAULT NULL,
|
||||||
`itemreference_media_media` int(11) DEFAULT NULL,
|
`itemreference_media_media` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`itemreference_partslist_id`)
|
PRIMARY KEY (`itemreference_media_id`)
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
|
||||||
)->execute();
|
|
||||||
|
|
||||||
$dbPool->get('core')->con->prepare(
|
|
||||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'itemreference_docs` (
|
|
||||||
`itemreference_docs_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`itemreference_docs_item` int(11) DEFAULT NULL,
|
|
||||||
`itemreference_docs_media` int(11) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`itemreference_partslist_id`)
|
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||||
)->execute();
|
)->execute();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace Modules\ItemManagement\Models;
|
namespace Modules\ItemManagement\Models;
|
||||||
|
|
||||||
|
use Modules\Media\Models\Media;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account class.
|
* Account class.
|
||||||
*
|
*
|
||||||
|
|
@ -43,38 +45,114 @@ class Item
|
||||||
|
|
||||||
private $successor = 0;
|
private $successor = 0;
|
||||||
|
|
||||||
public function __construct(int $id = 0)
|
private $media = [];
|
||||||
|
|
||||||
|
private $l11n = null;
|
||||||
|
|
||||||
|
private $attributes = [];
|
||||||
|
|
||||||
|
private $partslist = null;
|
||||||
|
|
||||||
|
private $purchase = [];
|
||||||
|
|
||||||
|
private $disposal = null;
|
||||||
|
|
||||||
|
private $createdAt = null;
|
||||||
|
|
||||||
|
private $info = '';
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->createdAt = new \DateTime('now');
|
$this->createdAt = new \DateTime('now');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getId() : int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCreatedAt() : \DateTime
|
||||||
|
{
|
||||||
|
return $this->createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
public function getNumber() : int
|
public function getNumber() : int
|
||||||
{
|
{
|
||||||
return $this->number;
|
return $this->number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setNumber(int $number) /* : void */
|
||||||
|
{
|
||||||
|
$this->number = $number;
|
||||||
|
}
|
||||||
|
|
||||||
public function getArticleGroup() : int
|
public function getArticleGroup() : int
|
||||||
{
|
{
|
||||||
return $this->articleGroup;
|
return $this->articleGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setArticleGroup(int $segment) /* : void */
|
||||||
|
{
|
||||||
|
$this->articleGroup = $segment;
|
||||||
|
}
|
||||||
|
|
||||||
public function getSalesGroup() : int
|
public function getSalesGroup() : int
|
||||||
{
|
{
|
||||||
return $this->salesGroup;
|
return $this->salesGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setSalesGroup(int $segment) /* : void */
|
||||||
|
{
|
||||||
|
$this->salesGroup = $segment;
|
||||||
|
}
|
||||||
|
|
||||||
public function getProductGroup() : int
|
public function getProductGroup() : int
|
||||||
{
|
{
|
||||||
return $this->productGroup;
|
return $this->productGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setProductGroup(int $segment) /* : void */
|
||||||
|
{
|
||||||
|
$this->productGroup = $segment;
|
||||||
|
}
|
||||||
|
|
||||||
public function getSegment() : int
|
public function getSegment() : int
|
||||||
{
|
{
|
||||||
return $this->segment;
|
return $this->segment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setSegment(int $segment) /* : void */
|
||||||
|
{
|
||||||
|
$this->segment = $segment;
|
||||||
|
}
|
||||||
|
|
||||||
public function getSuccessor() : int
|
public function getSuccessor() : int
|
||||||
{
|
{
|
||||||
return $this->successor;
|
return $this->successor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setSuccessor(int $successor) /* : void */
|
||||||
|
{
|
||||||
|
$this->successor = $successor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMedia() : array
|
||||||
|
{
|
||||||
|
return $this->media;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addMedia(Media $media) /* : void */
|
||||||
|
{
|
||||||
|
$this->media[] = $media;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getInfo() : string
|
||||||
|
{
|
||||||
|
return $this->info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setInfo(string $info) /* : void */
|
||||||
|
{
|
||||||
|
$this->info = $info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user