// Path: src/main/java/com/sajo/teamkerbell/repository/TimelineRepository.java
// @Repository
// public interface TimelineRepository extends JpaRepository<Timeline, Integer> {
//     @Query("select t from Timeline t left join Project p on p.projectId = t.projectId left join p.users u where u.userId = ?1")
//     List<Timeline> findByUserId(Integer userId, Pageable pageable);
// }


import com.sajo.teamkerbell.entity.*;
import com.sajo.teamkerbell.repository.TimelineRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
package com.sajo.teamkerbell.service;



@Service
@Transactional
@RequiredArgsConstructor
public class TimelineService {
    private final TimelineRepository timelineRepository;

    public Timeline append(Schedule schedule) {
        return timelineRepository.save(Timeline.from(schedule));
    }

    public Timeline append(FileDB fileDB) {
        return timelineRepository.save(Timeline.from(fileDB));
    }

// Path: src/main/java/com/sajo/teamkerbell/repository/TimelineRepository.java
// @Repository
// public interface TimelineRepository extends JpaRepository<Timeline, Integer> {
//     @Query("select t from Timeline t left join Project p on p.projectId = t.projectId left join p.users u where u.userId = ?1")
//     List<Timeline> findByUserId(Integer userId, Pageable pageable);
// }


// Path: src/main/java/com/sajo/teamkerbell/service/TimelineService.java
import com.sajo.teamkerbell.entity.*;
import com.sajo.teamkerbell.repository.TimelineRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

package com.sajo.teamkerbell.service;



@Service
@Transactional
@RequiredArgsConstructor
public class TimelineService {
    private final TimelineRepository timelineRepository;

    public Timeline append(Schedule schedule) {
        return timelineRepository.save(Timeline.from(schedule));
    }

    public Timeline append(FileDB fileDB) {
        return timelineRepository.save(Timeline.from(fileDB));
    }

    public Timeline append(TodoList todoList) {