<?php

namespace App\Generated\V1\DTOs;

use Kamicloud\StubApi\Concerns\ValueHelper;
use Kamicloud\StubApi\DTOs\DTO;
use Kamicloud\StubApi\Utils\Constants;

class PageDTO extends DTO
{
    use ValueHelper;

    protected $total;
    protected $page;
    protected $limit;

    /**
     * 总数
     * @return int
     */
    public function getTotal()
    {
        return $this->total;
    }

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

    /**
     * 页距
     * @return int
     */
    public function getLimit()
    {
        return $this->limit;
    }

    public function setTotal($total)
    {
        $this->total = $total;
    }

    public function setPage($page)
    {
        $this->page = $page;
    }

    public function setLimit($limit)
    {
        $this->limit = $limit;
    }

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

}
