This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Proposal for Plane, Bus, Restaurant and Cinema Seats

Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

Skip to end of metadata
Go to start of metadata

 

Introduction

This page is a discussion for the implementation on how we register the reservation of seats in a location for a certain date and time. Please add comments and/or amend the text.

 Please look at : OFBIZ-1590 for the implementation patches

Current system 

Currently there is a reservation possibility for rooms in a Hotel. It makes usage of the product --> fixedasset --> techdatacalendar  entities for registration of location and availability. Reservations are stored in the order --> orderitem --> workEffort -> fixedasset entities.

This is fine for rooms in a Hotel but this organization has the following problems:

  • There is a duplication of data for the reservation date in workeffort and the availability date in the techData calendar.
  • It does not cater for floorplans as is used in planes, cinemas and busses and in most restaurants.

Proposed Changes 

 As suggested in the mailinglist,  it is proposed to add 3 more entities:

  1. accomodationMap (of a fixed asset)
    This is a floorplan of a fixedasset which can be a vehicle,plane or restaurant-area of a facility.
  2. accomodationSpot (of a accomodationmap)
    This is a seat, table, chair of the accomodation map for a certain accomodation class
  3. accomodationClass (type of accomodationSpot)
    this is the type of class, like firstClass,businessClass but also standard or luxuryroom.
  4. Reservations are still done using the current implementation however we need to add accomodationMapId and accomodationSpotId to the workeffort.

The following picutre I (Valentina) upload describes the entities AccoomdationClass, AccommodationMap, AccommodationSpot. 
 
Picture description
In red dotted lines are some enhancment that I think might be very useful:
Enhancement1: Entity AccoomdationClass might be extended with parentAccClass field
to enable more flexible structure of the classes.
Enhancement2: Overbooked field in AccommodationMap entity might be added to store
overbooking data for each class.

 
Entities purposes:
The first two entities are described in the upper comments I would like to say just a bit more about AccommodationSpot.
AccommodationSpot-defines a SPECIFIC spot that is available within accommodation map.
Spots might be fa but this is not a must. This make it very useful in cases where we
need to model seats for example. In this entity we store the number of the room/table/seat. I  modified its type to be  varchar
as plane seats for example are mixture of different letters and numbers.
 
I created jira issue where I uploaded the patch for these entities(with the fields I think
we need to enhance, but if the community does not agree on them just don`t take them).Here is the linkofbiz-1590

Definitions

  • A restaurant is a facility with a dining area which is a fixed asset having a accomodation map with spots which are tables and/or seats. A table can be reserved selecting the product (table reservation for fixedasset 'dining area' in a facility) and selecting the accomodation spot from the related map.
  • An Aeroplane, Bus or Train is a  fixed asset having a accomodation map with spots in several classes flying from airport A which is a facility to airport B which is another facility
  • A hotel is a facility with a restaurant (fixedasset) and rooms (single fixed asset) having a accomodation map with spots which are rooms.

2 Comments

  1. Unknown User (vsirkova)

    Hans and all, I would like to comment that I am not exactly sure if workeffort entity `s extention with spotId field is the best solution.
     
    In the current system probably this is ok-it will fix the problems but maybe it would be better if we find a more general solution for reservations in OFBiz.  I guess these three  entities are a way to go but there is more that should be done.
    The book for example keeps the reservation data in entities :Reservation and ReservationItem.
    As stated in "travel orders" chapter of the book  "reservation in travel industry is order" which means these two entities
    are similar to our OrderItems entities. Maybe we could extend Order and OrderItem  with the necessary fields(or use the Reservation and ReservationItem entities from the book which I believe would be harder but probably better) and instead of trying to extend workeffort we could transform our current reservation logic and implementation to the one described in the book(the code is not that much)?

    I will be happy to work with you if you if you think this is good approach.

    What do you think? 

  2. Thanks Valentina,

    Interesting, I have still to read the book. We should pay attention to this. I read lately that the bigger part of eCommerce in France is in this area. OK, France may not be a good example as we have a lot of tourism here. But I'm sure it's a really important topic !

    Moreover this could be used in conjunction with POS for restaurants, hair dresser and such activities involving tables and seats.

    Note : fa is abbreviation for FixedAsset.