<?php

namespace Daylight\Core\Modules\Admin\Entities;

class Widget
{
    public string $key;

    public ?string $permission = null;

    public int $order = 0;

    public function __construct()
    {
        //
    }

    public function setKey(string $key): self
    {
        $this->key = $key;

        return $this;
    }

    public function setPermission(?string $permission): self
    {
        $this->permission = $permission;

        return $this;
    }

    public function setOrder(int $order): self
    {
        $this->order = $order;

        return $this;
    }

    public function getPermission(): ?string
    {
        return $this->permission;
    }

    public static function create(): self
    {
        return new self;
    }
}
