2024-07-06 20:55:25 +00:00
|
|
|
package repository
|
|
|
|
|
2024-07-09 21:08:31 +00:00
|
|
|
import (
|
|
|
|
"go-udemy-web-1/internal/models"
|
|
|
|
"time"
|
|
|
|
)
|
2024-07-08 21:04:17 +00:00
|
|
|
|
2024-07-06 20:55:25 +00:00
|
|
|
type DatabaseRepo interface {
|
|
|
|
AllUsers() bool
|
2024-07-08 21:04:17 +00:00
|
|
|
|
2024-07-09 20:57:07 +00:00
|
|
|
InsertReservation(res models.Reservation) (int, error)
|
|
|
|
InsertRoomRestriction(res models.RoomRestriction) error
|
2024-07-09 21:50:54 +00:00
|
|
|
SearchAvailabilityByDatesByRoomID(start, end time.Time, roomID int) (bool, error)
|
|
|
|
SearchAvailabilityForAllRooms(start, end time.Time) ([]models.Room, error)
|
2024-07-10 20:34:27 +00:00
|
|
|
GetRoomById(id int) (models.Room, error)
|
2024-07-06 20:55:25 +00:00
|
|
|
}
|