Hotel Reservation

TOOLSFINANCIAL

Contract purpose

This is a contract used for hotel booking. It can be used to book a hotel, request information about a hotel or about a particular reservation

Exposed methods

addHotel lets the owner add a new hotel

parameter nametypedetails
_nrRoomsintegerthe number of rooms of the hotel
_roomPriceintegerthe price of a room

bookHotel allows the user to book any number of rooms (if available) at a particular hotel

parameter nametypedetails
_idintegerthe id of the booked hotel
_nrRoomsBookedintegerthe number of booked rooms

getHotelDetails can only be called by the owner. Besides the hotel details, it also shows the IDs of the reservations for that hotel

parameter nametypedetails
_hotelIDintegerthe id of the requested hotel

getReservationDetails can only be called by the owner or by the customer who made the particular reservation

parameter nametypedetails
_reservationIDintegergets if address is owner

getHotel shows the details (number of rooms, price per room and booked rooms) for a hotel from the list

parameter nametypedetails
_hotelIDintegerthe id of the requested hotel
Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract