Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"Bash(dir:*)",
"Bash(del /f \"C:\\Users\\haeun\\OneDrive\\Desktop\\BEProject\\konnect-back\\src\\main\\java\\com\\example\\konnect_backend\\domain\\auth\\dto\\request\\SignInRequest.java.bak\")",
"Bash(del /f \"C:\\Users\\haeun\\OneDrive\\Desktop\\BEProject\\konnect-back\\src\\main\\java\\com\\example\\konnect_backend\\domain\\ai\\service\\FileTranslationService.java\")",
"Bash(test:*)"
"Bash(test:*)",
"Bash(./gradlew bootRun:*)",
"Bash(curl:*)",
"Bash(./gradlew test:*)"
],
"deny": [],
"ask": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ public class DifficultExpressionExtractorModule implements PromptModule<String,

## 중요
- original: 원본 한국어 표현 그대로
- explanation: %s로 쉽게 풀어서 설명 (간단명료하게)
- explanation: %s로 쉽게 풀어서 설명 (간단명료하게, 순수 텍스트만)
- 최대 10개까지만 추출
- 정말 어려운 표현만 선별

## 출력 형식 규칙 (필수)
- 마크다운 문법 사용 금지 (###, **, *, -, |, 표 등 사용하지 않기)
- explanation 필드는 순수 텍스트로만 작성

## 분석할 텍스트
%s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ public class DocumentClassifierModule implements PromptModule<String, Classifica
## 분석할 텍스트
%s

## 출력 형식 규칙 (필수)
- 마크다운 문법 사용 금지 (###, **, *, -, |, 표 등 사용하지 않기)
- 모든 텍스트 필드는 순수 텍스트로만 작성

## 응답 형식 (반드시 아래 JSON 형식으로만 출력, 다른 텍스트 없이)
분류 과정을 단계별로 설명해주세요:
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public class KoreanSimplifierModule implements PromptModule<String, String> {
- 문서의 전체 내용과 구조는 유지
- 의미가 달라지지 않도록 주의

## 출력 형식 규칙 (필수)
- 마크다운 문법 사용 금지 (###, **, *, -, |, 표 등 사용하지 않기)
- 순수 텍스트로만 작성
- 줄바꿈은 허용하되, 특수 기호나 서식 없이 일반 문장으로 작성

## 원본 텍스트
%s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public class SummarizerModule implements PromptModule<String, String> {
- 학부모가 바로 이해할 수 있게 명확하게 작성
- %s로 요약문만 출력하고 다른 설명은 하지 마세요

## 출력 형식 규칙 (필수)
- 마크다운 문법 사용 금지 (###, **, *, -, |, 표 등 사용하지 않기)
- 순수 텍스트로만 작성
- 줄바꿈은 허용하되, 특수 기호나 서식 없이 일반 문장으로 작성

## 번역문
%s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public class TranslatorModule implements PromptModule<String, String> {
- 문단 구조 유지
- 번역문만 출력하고 다른 설명은 하지 마세요

## 출력 형식 규칙 (필수)
- 마크다운 문법 사용 금지 (###, **, *, -, |, 표 등 사용하지 않기)
- 순수 텍스트로만 작성
- 줄바꿈은 허용하되, 특수 기호나 서식 없이 일반 문장으로 작성

## 원문
%s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public class UnifiedExtractorModule implements PromptModule<String, ExtractionRe
- 모든 텍스트 필드는 반드시 %s로 작성해주세요
- 원본이 한국어여도 %s로 번역하여 출력

## 출력 형식 규칙 (필수)
- 마크다운 문법 사용 금지 (###, **, *, -, |, 표 등 사용하지 않기)
- 모든 텍스트 필드는 순수 텍스트로만 작성

## 오늘 날짜 (연도 추론에 활용)
%s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public class Schedule extends BaseEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long scheduleId;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", nullable = false)
private User user;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "child_id")
private Child child;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.example.konnect_backend.domain.schedule.entity;

import com.example.konnect_backend.domain.user.entity.User;
import com.example.konnect_backend.domain.schedule.entity.status.RepeatEndType;
import com.example.konnect_backend.domain.schedule.entity.status.RepeatType;
import com.example.konnect_backend.global.common.BaseEntity;
Expand All @@ -23,18 +22,16 @@ public class ScheduleRepeat extends BaseEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@ManyToOne
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "schedule_id", nullable = false)
private Schedule schedule;

@ManyToOne
@JoinColumn(name = "user_id", nullable = false)
private User user;

@Enumerated(EnumType.STRING)
@Column(nullable = false)
private RepeatType repeatType; // DAILY, WEEKLY, MONTHLY, YEARLY

@Enumerated(EnumType.STRING)
@Column(nullable = false)
private RepeatEndType repeatEndType; // FOREVER, UNTIL_DATE, COUNT

private LocalDateTime repeatEndDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@

import com.example.konnect_backend.domain.schedule.entity.Schedule;
import com.example.konnect_backend.domain.schedule.entity.ScheduleRepeat;
import com.example.konnect_backend.domain.user.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

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

@Repository
public interface ScheduleRepeatRepository extends JpaRepository<ScheduleRepeat, Long> {

Optional<ScheduleRepeat> findBySchedule(Schedule schedule);

List<ScheduleRepeat> findByUser(User user);


void deleteBySchedule(Schedule schedule);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,38 @@

@Repository
public interface ScheduleRepository extends JpaRepository<Schedule, Long> {

@Query("SELECT s FROM Schedule s WHERE s.user = :user " +
"AND ((s.startDate >= :startDate AND s.startDate < :endDate) " +
"OR (s.endDate > :startDate AND s.endDate <= :endDate) " +

/**
* 사용자의 모든 일정을 반복 설정과 함께 조회 (Fetch Join으로 N+1 방지)
*/
@Query("SELECT DISTINCT s FROM Schedule s " +
"LEFT JOIN FETCH s.scheduleRepeat " +
"WHERE s.user = :user " +
"ORDER BY s.startDate ASC")
List<Schedule> findAllByUserWithRepeat(@Param("user") User user);

/**
* 특정 기간 내 일정을 반복 설정과 함께 조회
*/
@Query("SELECT DISTINCT s FROM Schedule s " +
"LEFT JOIN FETCH s.scheduleRepeat " +
"WHERE s.user = :user " +
"AND ((s.startDate >= :startDate AND s.startDate <= :endDate) " +
"OR (s.endDate >= :startDate AND s.endDate <= :endDate) " +
"OR (s.startDate <= :startDate AND s.endDate >= :endDate)) " +
"ORDER BY s.startDate ASC")
List<Schedule> findByUserAndDateRange(@Param("user") User user,
@Param("startDate") LocalDateTime startDate,
@Param("endDate") LocalDateTime endDate);

@Query("SELECT s FROM Schedule s WHERE s.user = :user " +
List<Schedule> findByUserAndDateRangeWithRepeat(@Param("user") User user,
@Param("startDate") LocalDateTime startDate,
@Param("endDate") LocalDateTime endDate);
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The findByUserAndDateRangeWithRepeat method is defined but never used in the service layer. The service now uses findAllByUserWithRepeat and filters in memory instead. Consider either removing this unused method or documenting why it's kept for future use.

Copilot uses AI. Check for mistakes.

/**
* 현재 시점 이후의 예정된 일정 조회 (반복 설정 포함)
*/
@Query("SELECT DISTINCT s FROM Schedule s " +
"LEFT JOIN FETCH s.scheduleRepeat " +
"WHERE s.user = :user " +
"AND s.startDate >= :now " +
"ORDER BY s.startDate ASC")
List<Schedule> findUpcomingSchedules(@Param("user") User user,
@Param("now") LocalDateTime now);

List<Schedule> findByUserOrderByStartDateDesc(User user);

@Query("SELECT s FROM Schedule s WHERE s.user = :user " +
"AND DATE(s.startDate) = :date " +
"ORDER BY s.startDate ASC")
List<Schedule> findByUserAndDate(@Param("user") User user,
@Param("date") LocalDateTime date);

@Query("SELECT s FROM Schedule s WHERE s.user = :user " +
"AND s.startDate >= :startOfWeek AND s.startDate < :endOfWeek " +
"ORDER BY s.startDate ASC")
List<Schedule> findByUserAndWeek(@Param("user") User user,
@Param("startOfWeek") LocalDateTime startOfWeek,
@Param("endOfWeek") LocalDateTime endOfWeek);

@Query("SELECT DATE(s.startDate) as date, COUNT(s) as count " +
"FROM Schedule s WHERE s.user = :user " +
"AND s.startDate >= :startDate AND s.startDate < :endDate " +
"GROUP BY DATE(s.startDate)")
List<Object[]> findScheduleCountsByDate(@Param("user") User user,
@Param("startDate") LocalDateTime startDate,
@Param("endDate") LocalDateTime endDate);

@Query("SELECT s FROM Schedule s WHERE s.user = :user " +
"AND DATE(s.startDate) = CURRENT_DATE " +
"ORDER BY s.startDate ASC")
List<Schedule> findTodaySchedules(@Param("user") User user);
List<Schedule> findUpcomingSchedulesWithRepeat(@Param("user") User user,
@Param("now") LocalDateTime now);
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method findUpcomingSchedulesWithRepeat is defined but never called in the service layer. This appears to be an unused method that should either be utilized in the getRecentSchedules method (if it provides better performance) or removed to keep the codebase clean.

Copilot uses AI. Check for mistakes.
}
Loading