package de.cannamanage.service.repository;

import de.cannamanage.domain.entity.MemberFeeAssignment;
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 MemberFeeAssignmentRepository extends JpaRepository<MemberFeeAssignment, UUID> {

    Optional<MemberFeeAssignment> findByMemberIdAndValidToIsNull(UUID memberId);

    List<MemberFeeAssignment> findByClubId(UUID clubId);

    List<MemberFeeAssignment> findByClubIdAndValidToIsNull(UUID clubId);
}
