1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Refactored sort system a little

To standardise the handled data format a little better.
This commit is contained in:
Dan Brown
2022-01-04 17:31:57 +00:00
parent a72bd75e3a
commit edc7c12edf
4 changed files with 130 additions and 32 deletions

View File

@@ -0,0 +1,51 @@
<?php
namespace BookStack\Entities\Tools;
use BookStack\Entities\Models\BookChild;
class BookSortMapItem
{
/**
* @var int
*/
public $id;
/**
* @var int
*/
public $sort;
/**
* @var ?int
*/
public $parentChapterId;
/**
* @var string
*/
public $type;
/**
* @var int
*/
public $parentBookId;
/**
* @var ?BookChild
*/
public $model = null;
public function __construct(int $id, int $sort, ?int $parentChapterId, string $type, int $parentBookId)
{
$this->id = $id;
$this->sort = $sort;
$this->parentChapterId = $parentChapterId;
$this->type = $type;
$this->parentBookId = $parentBookId;
}
}