<?php

declare(strict_types=1);

namespace App\Module\Core\Domain\Repository;

use App\Module\Core\Domain\Entity\Permission;

interface PermissionRepositoryInterface
{
    public function findById(int $id): ?Permission;

    public function findByCode(string $code): ?Permission;

    /** @return list<Permission> */
    public function findAll(): array;

    /** @return list<string> */
    public function findAllCodes(): array;

    public function save(Permission $permission): void;
}
