<?php


namespace App\Services\JWT\JWTPayload;


use App\Utils\Entity;

class JWTPayload extends Entity
{
    protected $uid;
    protected $profile;
    protected $iat;
    protected $exp;
    protected $permissions;

    public static function builder() : JWTPayloadBuilder
    {
        return new JWTPayloadBuilder;
    }

    /**
     * @return int
     */
    public function getUid(): int
    {
        return $this->uid;
    }

    /**
     * @return int
     */
    public function getProfile(): int
    {
        return $this->profile;
    }

    /**
     * @return string
     */
    public function getIat(): string
    {
        return $this->iat;
    }

    /**
     * @return string
     */
    public function getExp(): string
    {
        return $this->exp;
    }

    /**
     * @param int $uid
     */
    public function setUid(int $uid): void
    {
        $this->uid = $uid;
    }

    /**
     * @param int $profile
     */
    public function setProfile(int $profile): void
    {
        $this->profile = $profile;
    }

    /**
     * @param string $iat
     */
    public function setIat(string $iat): void
    {
        $this->iat = $iat;
    }

    /**
     * @param string $exp
     */
    public function setExp(string $exp): void
    {
        $this->exp = $exp;
    }

    /**
     * @return mixed
     */
    public function getPermissions(): array
    {
        return $this->permissions;
    }

    public function setPermissions(array $permissions): void
    {
        $this->permissions = $permissions;
    }
}
