Files
sbnews/server/app/adminapi/lists/lottery/LotteryRegionLists.php
T
2026-06-11 12:15:29 +08:00

34 lines
822 B
PHP

<?php
namespace app\adminapi\lists\lottery;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsSearchInterface;
use app\common\model\lottery\LotteryGameCategory;
class LotteryRegionLists extends BaseAdminDataLists implements ListsSearchInterface
{
public function setSearch(): array
{
return [
'%like%' => ['label'],
'=' => ['is_show'],
];
}
public function lists(): array
{
return LotteryGameCategory::where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order('sort', 'asc')
->order('id', 'desc')
->select()
->toArray();
}
public function count(): int
{
return LotteryGameCategory::where($this->searchWhere)->count();
}
}