Hans, everyone,

In my opinion the seat/table numbering problematic could be solved with
the help of the entities AccommodationClass, AccommodationMap  described
in the book vol2.I will give you a short description of these entities
and example of the "numbering issue" solution.

AccommodationClass - description:
It is designed to store classes information(these could be plane, bus
classes, table types, chair types, room types etc)
AccommodationClass - definition(based on the book but modified a little)
fields: accClassId, parentAccClassId, description

AccommodationMap - description:
Its idea is to provide information of the number of spaces offered by a
fa/accClass. Here we can extend it to provide overbooking information
and seat numbering information(the last two fields in the definition
below)
fields: mapId, accClassId, faId, nrOfSpaces, overBooked, number

Example:
Define two tables.
 - Table number 5 has 3 chairs. Chair with number 1 is baby_chair. The
other two chairs with number 2 and 3 are high_chairs.
 - Table number 9 has 2 chairs. Chairs number 1 and 2 are normal_chairs.

In FixedAsset relate the tables to the chairs.
FixedAsset:fixedAssetId=table1
FixedAsset:fixedAssetId=table2
FixedAsset:fixedAssetId=chair11, parentFixedAssetId=table1 //chair11
belongs to table1
FixedAsset:fixedAssetId=chair12, parentFixedAssetId=table1 //chair12
belongs to table1
FixedAsset:fixedAssetId=chair13, parentFixedAssetId=table1 //chair13
belongs to table1
FixedAsset:fixedAssetId=chair14, parentFixedAssetId=table2 //chair14
belongs to table2
FixedAsset:fixedAssetId=chair15, parentFixedAssetId=table2 //chair15
belongs to table2

In Accommodationclass define the table/chair classes.
AccommodationClass: accClassId=tables
AccommodationClass: accClassId=chairs
AccommodationClass: accClassId=plane_classes
AccommodationClass: accClassId=baby_chair,    parentAccClassId=chairs;
AccommodationClass: accClassId=high_chair,    parentAccClassId=chairs;
AccommodationClass: accClassId=normal_chair,  parentAccClassId=chairs;


In AccommodationMap define how many places each table or chair has and
which is its number.
AccommodationMap: accClassId=tables,        fixedAssetId=table1,
nrOfSpaces=3, number=5 //table number 5 has 3 chairs(faId=table1)
AccommodationMap: accClassId=baby_chair,    fixedAssetId=chair11,
nrOfSpaces=1, number=1 //chair number 1 has one place(faId=chair11)
AccommodationMap: accClassId=high_chair,    fixedAssetId=chair12,
nrOfSpaces=1, number=2 //chair number 2 has one place(faId=chair12)
AccommodationMap: accClassId=high_chair,    fixedAssetId=chair13,
nrOfSpaces=1, number=3 //chair number 3 has one place(faId=chair13)
AccommodationMap: accClassId=tables,        fixedAssetId=table2,
nrOfSpaces=2, number=9 //table number 9 has two places(faId=table2)
AccommodationMap: accClassId=normal_chair,  fixedAssetId=chair14,
nrOfSpaces=1, number=1 //chair number 1 has one place(faId=chair14)
AccommodationMap: accClassId=normal_chair,  fixedAssetId=chair15,
nrOfSpaces=1, number=2 //chair number 2 has one place(faId=chair15)

In similar fashion you can define theaters, planes etc.Also overbooking
data could be kept in the AccommodationMap entity which could be used
for hotel reservations. Hourly reservations could be enabled as well
with the introduction of the AccommodationSpot entity. If you are
interested I can provide a patch. Should I create issue and patch or
just paste it here?

Reply via email to