kepler.models.reservation module

The module defines the classes for database models related to reservations.

class kepler.models.reservation.Reservation(time_slot_id, unit_id, unit_group_id, user_group_id, creator_id)

Bases: sqlalchemy.ext.declarative.api.Base

The SQLAlchemy declarative model class for a Reservation object holds information about the user or group who made the reservation and about the time slot containing the reservation.

created_at

The creation time of the reservation.

creator_id

The user ID of the person who made the reservation.

id

The ID of the reservation.

time_slot_id

The reference to the TimeSlot to which the reservation belongs to.

unit_group_id

The reference to the UnitGroup that the reserved unit belongs to.

unit_id

The reference to the Unit that the reseration was made for.

user_group_id

The reference to the UserGroup for which the reservation was made.

class kepler.models.reservation.ReservationStatus(reservation_id, reservation_status_type_id)

Bases: kepler.models.models_meta.ModifiableBase, sqlalchemy.ext.declarative.api.Base

The SQLAlchemy declarative model class for a ReservationStatus object holds information about the status of the reservation (for example, was the reservation cancelled).

id

The reservation status ID.

modifier_id
reservation_id

The reference to the Reservation database table.

reservation_status_type_id

The reference to the ReservationStatusType database table.

class kepler.models.reservation.ReservationStatusType(id, name_tr_id)

Bases: sqlalchemy.ext.declarative.api.Base

The SQLAlchemy declarative model class defines the ReservationStatusType object that holds the information of different reservation status types.

active

Defines whether the status type is active or has been deactivated.

id

The ID of the reservation status type.

name_tr_id

The translation ID of the reservation status type name.