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