src/Dtos/Microservices/Requests/NotificationFilters.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Dtos\Microservices\Requests;
  3. class NotificationFilters extends ListDto
  4. {
  5.     public function __construct(
  6.         int $page 1,
  7.         int $perPage 10,
  8.         private ?int $societyId,
  9.         private ?int $categoryId,
  10.         private ?int $subcategoryId,
  11.         private ?int $headerId,
  12.     ) {
  13.         parent::__construct($page$perPage);
  14.     }
  15.     public function getSocietyId(): ?int
  16.     {
  17.         return $this->societyId;
  18.     }
  19.     public function setSocietyId(int $societyId): void
  20.     {
  21.         $this->societyId $societyId;
  22.     }
  23.     /**
  24.      * @return int|null
  25.      */
  26.     public function getCategoryId(): ?int
  27.     {
  28.         return $this->categoryId;
  29.     }
  30.     /**
  31.      * @param int|null $categoryId
  32.      */
  33.     public function setCategoryId(?int $categoryId): void
  34.     {
  35.         $this->categoryId $categoryId;
  36.     }
  37.     /**
  38.      * @return int|null
  39.      */
  40.     public function getSubcategoryId(): ?int
  41.     {
  42.         return $this->subcategoryId;
  43.     }
  44.     /**
  45.      * @param int|null $subcategoryId
  46.      */
  47.     public function setSubcategoryId(?int $subcategoryId): void
  48.     {
  49.         $this->subcategoryId $subcategoryId;
  50.     }
  51.     /**
  52.      * @return int|null
  53.      */
  54.     public function getHeaderId(): ?int
  55.     {
  56.         return $this->headerId;
  57.     }
  58.     /**
  59.      * @param int|null $headerId
  60.      */
  61.     public function setHeaderId(?int $headerId): void
  62.     {
  63.         $this->headerId $headerId;
  64.     }
  65.     public function toArray(): array
  66.     {
  67.         return [
  68.             'page' => $this->getPage(),
  69.             'per_page' => $this->getPerPage(),
  70.             'society_id' => $this->getSocietyId(),
  71.             'category_id' => $this->getCategoryId(),
  72.             'subcategory_id' => $this->getSubcategoryId(),
  73.             'header_id' => $this->getHeaderId(),
  74.         ];
  75.     }
  76. }