package net.siegeln.cameleer.saas.tenant;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;
import java.util.UUID;

@Repository
public interface TenantRepository extends JpaRepository<TenantEntity, UUID> {
    Optional<TenantEntity> findBySlug(String slug);
    Optional<TenantEntity> findByLogtoOrgId(String logtoOrgId);
    List<TenantEntity> findByStatus(TenantStatus status);
    boolean existsBySlug(String slug);
    boolean existsBySlugAndStatusNot(String slug, TenantStatus status);
}
