- Timestamp:
- 01/19/25 23:18:37 (4 months ago)
- Branches:
- main
- Children:
- f5b256e
- Parents:
- db39d9e
- Location:
- src/main/java/com/example/rezevirajmasa/demo/repository
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/rezevirajmasa/demo/repository/ReservationHistoryRepository.java
rdb39d9e r8ca35dc 4 4 import com.example.rezevirajmasa.demo.model.Reservation; 5 5 import com.example.rezevirajmasa.demo.model.Restaurant; 6 import com.example.rezevirajmasa.demo.model.User; 6 7 import org.springframework.cglib.core.Local; 7 8 import org.springframework.data.jpa.repository.JpaRepository; … … 11 12 12 13 public interface ReservationHistoryRepository extends JpaRepository<Restaurant.ReservationHistory, Long> { 13 List<Restaurant.ReservationHistory> findA llByCustomer(Customer customer);14 List<Restaurant.ReservationHistory> findALlByUser(User user); 14 15 List<Restaurant.ReservationHistory> findByCheckInDateBeforeAndStatus(LocalDateTime currentTime, String scheduled); 15 16 List<Restaurant.ReservationHistory> findAllByCheckInDateBefore(LocalDateTime currentTime); -
src/main/java/com/example/rezevirajmasa/demo/repository/ReservationRepository.java
rdb39d9e r8ca35dc 1 1 package com.example.rezevirajmasa.demo.repository; 2 2 3 import com.example.rezevirajmasa.demo.model.Customer; 4 import com.example.rezevirajmasa.demo.model.Reservation; 5 import com.example.rezevirajmasa.demo.model.Restaurant; 6 import com.example.rezevirajmasa.demo.model.TableEntity; 3 import com.example.rezevirajmasa.demo.model.*; 7 4 import org.springframework.data.jpa.repository.JpaRepository; 8 5 … … 11 8 12 9 public interface ReservationRepository extends JpaRepository<Reservation, Long> { 13 List<Reservation> findA llByCustomer(Customer customer);10 List<Reservation> findALlByUserAndCheckInTimeAfter(User user, LocalDateTime now); 14 11 List<Reservation> findByTableAndCheckInTimeBetween(TableEntity table, LocalDateTime startTime, LocalDateTime endTime); 15 12 … … 17 14 List<Reservation> findAllByCheckInTimeBefore(LocalDateTime currentTime); 18 15 List<Reservation> findByCheckInTimeAfterAndCheckInTimeBefore(LocalDateTime startTime, LocalDateTime endTime); 16 List<Reservation> findALlByUserAndCheckInTimeBefore(User user, LocalDateTime now); 19 17 }
Note:
See TracChangeset
for help on using the changeset viewer.