package com.example.todolist.repository;

import java.util.List;

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

import com.example.todolist.entity.AttachedFile;

@Repository
public interface AttachedFileRepository extends JpaRepository<AttachedFile, Integer> {

    // SELECT * FROM attached_file WHERE todo_id = todoId ORER BY id に相当
    List<AttachedFile> findByTodoIdOrderById(Integer todoId);
}
