oms-Accounting/Models/L11nCostObject.php
2020-08-30 20:13:10 +02:00

207 lines
3.4 KiB
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Accounting\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Accounting\Models;
use phpOMS\Contract\ArrayableInterface;
use phpOMS\Localization\ISO639x1Enum;
/**
* CostObject class.
*
* @package Modules\Accounting\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class L11nCostObject implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.
*
* @var int
* @since 1.0.0
*/
protected int $id = 0;
/**
* CostObject ID.
*
* @var int
* @since 1.0.0
*/
protected int $costobject = 0;
/**
* Language.
*
* @var string
* @since 1.0.0
*/
protected string $language = ISO639x1Enum::_EN;
/**
* Name.
*
* @var string
* @since 1.0.0
*/
private string $name = '';
/**
* Description.
*
* @var string
* @since 1.0.0
*/
private string $description = '';
/**
* Get id
*
* @return int
*
* @since 1.0.0
*/
public function getId() : int
{
return $this->id;
}
/**
* Set costobject.
*
* @param int $costobject CostObject id
*
* @return void
*
* @since 1.0.0
*/
public function setCostObject(int $costobject) : void
{
$this->costobject = $costobject;
}
/**
* Get costobject
*
* @return int
*
* @since 1.0.0
*/
public function getCostObject() : int
{
return $this->costobject;
}
/**
* Get language
*
* @return string
*
* @since 1.0.0
*/
public function getLanguage() : string
{
return $this->language;
}
/**
* Set language
*
* @param string $language Language
*
* @return void
*
* @since 1.0.0
*/
public function setLanguage(string $language) : void
{
$this->language = $language;
}
/**
* Get costobject name.
*
* @return string
*
* @since 1.0.0
*/
public function getName() : string
{
return $this->name;
}
/**
* Set name
*
* @param string $name Name
*
* @return void
*
* @since 1.0.0
*/
public function setName(string $name) : void
{
$this->name = $name;
}
/**
* Get costobject description.
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
/**
* Set description
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescription(string $description) : void
{
$this->description = $description;
}
/**
* {@inheritdoc}
*/
public function toArray() : array
{
return [
'id' => $this->id,
'name' => $this->name,
'costobject' => $this->costobject,
'language' => $this->language,
];
}
/**
* {@inheritdoc}
*/
public function jsonSerialize()
{
return $this->toArray();
}
}