<?php

namespace Planaday\Entities\Booking;

use Planaday\Entities\Booking\DTO\Booking;
use Planaday\Entities\Booking\DTO\BookingForm;
use Planaday\Entities\Booking\DTO\Transaction;

interface BookingDatabase {
	public function getBooking(string $bookingId): ?Booking;
	public function setBooking(Booking $booking): string;
	public function removeBooking(string $bookingId): void;

	public function getCountAll(): int;

	public function generatePasswordBooking(string $bookingId): string;
	public function checkPasswordBooking(string $bookingId, string $password): bool;
	public function removePasswordBooking(string $bookingId): void;
	public function getTransaction(string $transactionId): ?Transaction;
	public function getBookingByTransaction(string $transactionId): ?Booking;
	public function removeOldBookings(string $beforeDate): void;
	public function getAlreadyCompletedBooking(BookingForm $bookingForm): ?Booking;
}