<?php

declare(strict_types=1);

namespace App\SuperAdmin\Domain\Repository;

use App\Shared\Domain\Tenant\TenantId;
use App\SuperAdmin\Domain\Model\Establishment\Establishment;
use App\SuperAdmin\Domain\Model\Establishment\EstablishmentId;

interface EstablishmentRepository
{
    public function save(Establishment $establishment): void;

    /**
     * @throws \App\SuperAdmin\Domain\Exception\EstablishmentIntrouvableException
     */
    public function get(EstablishmentId $id): Establishment;

    public function findByTenantId(TenantId $tenantId): ?Establishment;

    /**
     * @return Establishment[]
     */
    public function findAll(): array;
}
