<?php
namespace App\Dtos\Legacy\Requests;
class UserFilters extends ListDto
{
public function __construct(
int $page = 1,
int $perPage = 10,
private int $societyId,
private ?string $search = ''
) {
parent::__construct($page, $perPage);
}
public function getSocietyId(): ?int
{
return $this->societyId;
}
public function setSocietyId(int $societyId): void
{
$this->societyId = $societyId;
}
public function getSearch(): string
{
return $this->search;
}
public function setSearch(string $search): void
{
$this->search = $search;
}
public function toArray(): array
{
return [
'page' => $this->getPage(),
'per_page' => $this->getPerPage(),
'society_id' => $this->getSocietyId(),
'search' => $this->getSearch(),
];
}
}