package com.mosquito.project.persistence.repository;

import com.mosquito.project.persistence.entity.ShortLinkEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface ShortLinkRepository extends JpaRepository<ShortLinkEntity, Long> {
    Optional<ShortLinkEntity> findByCode(String code);
    Optional<ShortLinkEntity> findByTrackingId(String trackingId);
    boolean existsByCode(String code);
    boolean existsByTrackingId(String trackingId);
}

