package com.fsd.hellovelo.repository;

import com.fsd.hellovelo.entity.Coupon;
import com.fsd.hellovelo.entity.ECouponStatus;
import com.fsd.hellovelo.entity.EStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

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

@Repository
public interface CouponRepository extends JpaRepository<Coupon, Long> {
    Optional<Coupon> findByTitle(String title);

    List<Coupon> findByVisibilityAndStatus(ECouponStatus eCouponStatus, EStatus eStatus);

}
