<?php

namespace App\Generated\V1_1\Messages\Friend;

use Kamicloud\StubApi\Concerns\ValueHelper;
use Kamicloud\StubApi\Http\Messages\Message;
use Kamicloud\StubApi\Utils\Constants;
use App\Generated\V1_1\DTOs\PageDTO;
use App\Generated\V1_1\DTOs\ListFriendApplyDTO;

class GetAllFriendAppliesMessage extends Message
{
    use ValueHelper;

    protected $page;
    protected $pages;
    protected $list;

    /**
     * @return int
     */
    public function getPage()
    {
        return $this->page;
    }

    public function requestRules()
    {
        return [
            ['page', 'page', 'bail|integer', Constants::INTEGER, null],
        ];
    }

    public function responseRules()
    {
        return [
            ['pages', 'pages', PageDTO::class, Constants::MODEL, null],
            ['list', 'list', ListFriendApplyDTO::class, Constants::MODEL | Constants::ARRAY, null],
        ];
    }

    public function setResponse($pages, $list)
    {
        $this->pages = $pages;
        $this->list = $list;
    }

}
