Ignore:
Timestamp:
01/19/25 23:18:37 (4 months ago)
Author:
Aleksandar Panovski <apano77@…>
Branches:
main
Children:
f5b256e
Parents:
db39d9e
Message:

Done with stupid timeslots

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  
    44import com.example.rezevirajmasa.demo.model.Reservation;
    55import com.example.rezevirajmasa.demo.model.Restaurant;
     6import com.example.rezevirajmasa.demo.model.User;
    67import org.springframework.cglib.core.Local;
    78import org.springframework.data.jpa.repository.JpaRepository;
     
    1112
    1213public interface ReservationHistoryRepository extends JpaRepository<Restaurant.ReservationHistory, Long> {
    13     List<Restaurant.ReservationHistory> findAllByCustomer(Customer customer);
     14    List<Restaurant.ReservationHistory> findALlByUser(User user);
    1415    List<Restaurant.ReservationHistory> findByCheckInDateBeforeAndStatus(LocalDateTime currentTime, String scheduled);
    1516    List<Restaurant.ReservationHistory> findAllByCheckInDateBefore(LocalDateTime currentTime);
  • src/main/java/com/example/rezevirajmasa/demo/repository/ReservationRepository.java

    rdb39d9e r8ca35dc  
    11package com.example.rezevirajmasa.demo.repository;
    22
    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;
     3import com.example.rezevirajmasa.demo.model.*;
    74import org.springframework.data.jpa.repository.JpaRepository;
    85
     
    118
    129public interface ReservationRepository extends JpaRepository<Reservation, Long> {
    13     List<Reservation> findAllByCustomer(Customer customer);
     10    List<Reservation> findALlByUserAndCheckInTimeAfter(User user, LocalDateTime now);
    1411    List<Reservation> findByTableAndCheckInTimeBetween(TableEntity table, LocalDateTime startTime, LocalDateTime endTime);
    1512
     
    1714    List<Reservation> findAllByCheckInTimeBefore(LocalDateTime currentTime);
    1815    List<Reservation> findByCheckInTimeAfterAndCheckInTimeBefore(LocalDateTime startTime, LocalDateTime endTime);
     16    List<Reservation> findALlByUserAndCheckInTimeBefore(User user, LocalDateTime now);
    1917}
Note: See TracChangeset for help on using the changeset viewer.