oms-Kanban/Models/KanbanCardComment.php
2019-10-06 17:50:12 +02:00

164 lines
2.6 KiB
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Kanban\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Kanban\Models;
/**
* Task class.
*
* @package Modules\Kanban\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class KanbanCardComment implements \JsonSerializable
{
/**
* ID.
*
* @var int
* @since 1.0.0
*/
protected int $id = 0;
/**
* Description.
*
* @var string
* @since 1.0.0
*/
private string $description = '';
private $card = 0;
private $createdBy = 0;
private $createdAt = null;
private $media = [];
/**
* Constructor.
*
* @since 1.0.0
*/
public function __construct()
{
$this->createdAt = new \DateTime('now');
}
/**
* Get id.
*
* @return int Model id
*
* @since 1.0.0
*/
public function getId() : int
{
return $this->id;
}
public function setCard(int $id) : void
{
$this->card = $id;
}
public function getCard() : int
{
return $this->card;
}
/**
* Get 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;
}
/**
* Get created by
*
* @return int|\phpOMS\Account\Account
*
* @since 1.0.0
*/
public function getCreatedBy() : int
{
return $this->createdBy;
}
/**
* Set created by
*
* @param mixed $id Created by
*
* @return void
*
* @since 1.0.0
*/
public function setCreatedBy($id) : void
{
$this->createdBy = $id;
}
/**
* Get created at date time
*
* @return \DateTime
*
* @since 1.0.0
*/
public function getCreatedAt() : \DateTime
{
return $this->createdAt;
}
public function getMedia() : array
{
return $this->media;
}
public function addMedia($media) : void
{
$this->media[] = $media;
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : array
{
return [];
}
}