reservation.models.custom_reservation
Classes
Describes a pending or approved reservation. |
Module Contents
- class reservation.models.custom_reservation.CustomReservation[source]
Bases:
libres.db.models.Reservation
,onegov.core.orm.ModelBase
,onegov.pay.Payable
Describes a pending or approved reservation.
- property payable_reference: str[source]
A string which identifies this payable in payment lists. Do not join any values here as it can lead to an explosion of executed queries!
By default we use the table name plus a hash derived from the primary key values of the table. This ensures that we do not accidentally leak secrets.
In practice, this reference should be customised for each payable.
- price(resource: onegov.reservation.models.resource.Resource | None = None) onegov.pay.Price | None [source]
Returns the price of the reservation.
Even though one token may point to multiple reservations the price is bound to the reservation record.
The price per token is calculcated by combining all the prices.