Skip to content

Commit

Permalink
chore: 미사용 import 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Soundbar91 committed Dec 11, 2024
1 parent 9c271d2 commit a9bf032
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import in.koreatech.koin.domain.timetableV2.model.TimetableFrame;
import in.koreatech.koin.domain.user.model.User;
import jakarta.persistence.LockModeType;
import jakarta.validation.constraints.NotNull;

public interface TimetableFrameRepositoryV2 extends Repository<TimetableFrame, Integer> {

Expand Down Expand Up @@ -61,21 +60,22 @@ default TimetableFrame getByUser(User user) {
@Lock(LockModeType.PESSIMISTIC_WRITE)
@Query(
"""
SELECT t FROM TimetableFrame t
WHERE t.user.id = :userId
AND t.semester.id = :semesterId
AND t.isMain = false
ORDER BY t.createdAt ASC
LIMIT 1
""")
TimetableFrame findNextFirstTimetableFrame(@Param("userId") Integer userId, @Param("semesterId") Integer semesterId);
SELECT t FROM TimetableFrame t
WHERE t.user.id = :userId
AND t.semester.id = :semesterId
AND t.isMain = false
ORDER BY t.createdAt ASC
LIMIT 1
""")
TimetableFrame findNextFirstTimetableFrame(@Param("userId") Integer userId,
@Param("semesterId") Integer semesterId);

@Query(
"""
SELECT COUNT(t) FROM TimetableFrame t
WHERE t.user.id = :userId
AND t.semester.id = :semesterId
""")
SELECT COUNT(t) FROM TimetableFrame t
WHERE t.user.id = :userId
AND t.semester.id = :semesterId
""")
int countByUserIdAndSemesterId(@Param("userId") Integer userId, @Param("semesterId") Integer semesterId);

void deleteById(Integer id);
Expand All @@ -91,6 +91,7 @@ default TimetableFrame getByIdWithDeleted(Integer id) {
return findByIdWithDeleted(id)
.orElseThrow(() -> TimetableFrameNotFoundException.withDetail("id: " + id));
}

void deleteAllByUserAndSemester(User user, Semester semester);

List<TimetableFrame> findAllByUserId(Integer userId);
Expand Down

0 comments on commit a9bf032

Please sign in to comment.