api/app/util/ListCountData.php
2019-06-20 20:29:13 +08:00

35 lines
591 B
PHP

<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/6/20
* Time: 18:13
*/
namespace app\util;
class ListCountData
{
public $totalCount;
public $dataList;
public function __construct(int $count, $data)
{
$this->totalCount = $count;
$this->dataList = $data;
}
public static function Create(int $count, $data)
{
return new ListCountData($count, $data);
}
public function toArray()
{
return [
'totalCount' => $this->totalCount,
'list' => $this->dataList
];
}
}