<?php
namespace App\Dtos\Microservices\Requests;
class NotificationFilters extends ListDto
{
public function __construct(
int $page = 1,
int $perPage = 10,
private ?int $societyId,
private ?int $categoryId,
private ?int $subcategoryId,
private ?int $headerId,
) {
parent::__construct($page, $perPage);
}
public function getSocietyId(): ?int
{
return $this->societyId;
}
public function setSocietyId(int $societyId): void
{
$this->societyId = $societyId;
}
/**
* @return int|null
*/
public function getCategoryId(): ?int
{
return $this->categoryId;
}
/**
* @param int|null $categoryId
*/
public function setCategoryId(?int $categoryId): void
{
$this->categoryId = $categoryId;
}
/**
* @return int|null
*/
public function getSubcategoryId(): ?int
{
return $this->subcategoryId;
}
/**
* @param int|null $subcategoryId
*/
public function setSubcategoryId(?int $subcategoryId): void
{
$this->subcategoryId = $subcategoryId;
}
/**
* @return int|null
*/
public function getHeaderId(): ?int
{
return $this->headerId;
}
/**
* @param int|null $headerId
*/
public function setHeaderId(?int $headerId): void
{
$this->headerId = $headerId;
}
public function toArray(): array
{
return [
'page' => $this->getPage(),
'per_page' => $this->getPerPage(),
'society_id' => $this->getSocietyId(),
'category_id' => $this->getCategoryId(),
'subcategory_id' => $this->getSubcategoryId(),
'header_id' => $this->getHeaderId(),
];
}
}