add/change docs

This commit is contained in:
Dennis Eichhorn 2021-08-29 10:55:43 +02:00
parent c678eebefc
commit c6713866ba
7 changed files with 136 additions and 57 deletions

View File

@ -17,7 +17,7 @@ namespace Modules\Kanban\Models;
use phpOMS\Stdlib\Base\Enum;
/**
* Task status enum.
* Board status enum.
*
* @package Modules\Kanban\Models
* @license OMS License 1.0

View File

@ -17,7 +17,7 @@ namespace Modules\Kanban\Models;
use phpOMS\Stdlib\Base\Enum;
/**
* Task status enum.
* Card status enum.
*
* @package Modules\Kanban\Models
* @license OMS License 1.0

View File

@ -44,8 +44,20 @@ class KanbanBoard implements \JsonSerializable
*/
public string $name = '';
/**
* Board status.
*
* @var int
* @since 1.0.0
*/
private int $status = BoardStatus::ACTIVE;
/**
* Order.
*
* @var int
* @since 1.0.0
*/
public int $order = 0;
/**
@ -64,6 +76,12 @@ class KanbanBoard implements \JsonSerializable
*/
public string $descriptionRaw = '';
/**
* Board style.
*
* @var string
* @since 1.0.0
*/
public string $style = '';
/**
@ -74,10 +92,28 @@ class KanbanBoard implements \JsonSerializable
*/
private array $tags = [];
/**
* Creator.
*
* @var Account
* @since 1.0.0
*/
public Account $createdBy;
/**
* Created.
*
* @var \DateTimeImmutable
* @since 1.0.0
*/
public \DateTimeImmutable $createdAt;
/**
* Board columns.
*
* @var \Modules\Kanban\Models\KanbanColumn[]
* @since 1.0.0
*/
private array $columns = [];
/**
@ -129,32 +165,6 @@ class KanbanBoard implements \JsonSerializable
$this->status = $status;
}
/**
* Get the order
*
* @return int
*
* @since 1.0.0
*/
public function getOrder() : int
{
return $this->order;
}
/**
* Set the order
*
* @param int $order Order
*
* @return void
*
* @since 1.0.0
*/
public function setOrder(int $order) : void
{
$this->order = $order;
}
/**
* Get tags
*

View File

@ -46,12 +46,36 @@ class KanbanCard implements \JsonSerializable
*/
public string $name = '';
/**
* Card status.
*
* @var int
* @since 1.0.0
*/
private int $status = CardStatus::ACTIVE;
/**
* Card type.
*
* @var int
* @since 1.0.0
*/
private int $type = CardType::TEXT;
/**
* Color schme.
*
* @var string
* @since 1.0.0
*/
public string $color = '';
/**
* Card style.
*
* @var string
* @since 1.0.0
*/
public string $style = '';
/**
@ -78,16 +102,54 @@ class KanbanCard implements \JsonSerializable
*/
private array $tags = [];
/**
* Column this card belongs to.
*
* @var int
* @since 1.0.0
*/
private int $column = 0;
private int $order = 0;
/**
* Card order/position.
*
* @var int
* @since 1.0.0
*/
public int $order = 0;
/**
* Reference of this card.
*
* The reference is based on the card type and can be a task, calendar, ...
*
* @var int
* @since 1.0.0
*/
private int $ref = 0;
/**
* Created by.
*
* @var Account
* @since 1.0.0
*/
public Account $createdBy;
/**
* Created at.
*
* @var \DateTimeImmutable
* @since 1.0.0
*/
public \DateTimeImmutable $createdAt;
/**
* Comments.
*
* @var \Modules\Kanban\Models\KanbanCardComment[]
* @since 1.0.0
*/
private array $comments = [];
/**
@ -109,32 +171,6 @@ class KanbanCard implements \JsonSerializable
$this->createdBy = new NullAccount();
}
/**
* Get the order
*
* @return int
*
* @since 1.0.0
*/
public function getOrder() : int
{
return $this->order;
}
/**
* Set the order
*
* @param int $order Order
*
* @return void
*
* @since 1.0.0
*/
public function setOrder(int $order) : void
{
$this->order = $order;
}
/**
* Get id.
*

View File

@ -51,12 +51,36 @@ class KanbanCardComment implements \JsonSerializable
*/
public string $descriptionRaw = '';
/**
* Card of the comment.
*
* @var int
* @since 1.0.0
*/
private int $card = 0;
/**
* Created by.
*
* @var Account
* @since 1.0.0
*/
public Account $createdBy;
/**
* Created.
*
* @var \DateTimeImmutable
* @since 1.0.0
*/
public \DateTimeImmutable $createdAt;
/**
* Media.
*
* @var Media[]
* @since 1.0.0
*/
private array $media = [];
/**

View File

@ -41,17 +41,23 @@ class KanbanColumn implements \JsonSerializable
public string $name = '';
/**
* Column order
* Column order.
*
* @var int
* @since 1.0.0
*/
private int $order = 0;
/**
* Board.
*
* @var int
* @since 1.0.0
*/
private int $board = 0;
/**
* Cards
* Cards.
*
* @var array
* @since 1.0.0

View File

@ -38,6 +38,9 @@ class ControllerTest extends \PHPUnit\Framework\TestCase
protected $module = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->app = new class() extends ApplicationAbstract