package com.example.demo.repository;

import java.util.Optional;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.example.demo.model.NovelComicTask;

@Repository
public interface NovelComicTaskRepository extends JpaRepository<NovelComicTask, Long> {

    Optional<NovelComicTask> findByTaskId(String taskId);

    Page<NovelComicTask> findByUsernameOrderByCreatedAtDesc(String username, Pageable pageable);
}
