udemy-go-web-1/internal/repository/repository.go

16 lines
396 B
Go

package repository
import (
"go-udemy-web-1/internal/models"
"time"
)
type DatabaseRepo interface {
AllUsers() bool
InsertReservation(res models.Reservation) (int, error)
InsertRoomRestriction(res models.RoomRestriction) error
SearchAvailabilityByDatesByRoomID(start, end time.Time, roomID int) (bool, error)
SearchAvailabilityForAllRooms(start, end time.Time) ([]models.Room, error)
}