kepler.models.unit module¶
The module defines the classes for database models related to units. The units are the model for reservable things in the system.
-
class
kepler.models.unit.Unit(name_tr_id, max_user_group_size, description_tr_id=None)¶ Bases:
sqlalchemy.ext.declarative.api.BaseThe SQLAlchemy declarative model class for a
Unitobject holds information about the units that can be reserved by the users.-
description_tr_id¶ The translation ID of the description of the unit.
-
id¶ The ID of the unit.
-
max_user_group_size¶ The upper limit for the user group size that can make a reservation for the unit.
-
name_tr_id¶ The translation ID of the name of the unit.
-
-
class
kepler.models.unit.UnitGroup(name_tr_id, unit_type_id)¶ Bases:
sqlalchemy.ext.declarative.api.BaseThe SQLAlchemy declarative model class for a
UnitGroupobject holds information about the groups the units can belong to.-
active¶ Specifies whether the unit group is active or has been deactivated.
-
id¶ The ID of the unit group.
-
name_tr_id¶ The translation ID of the name of the unit group.
-
unit_type_id¶ The unit type of the unit group.
-
-
class
kepler.models.unit.UnitGroupMap(unit_id, unit_group_id, qualifier)¶ Bases:
sqlalchemy.ext.declarative.api.BaseThe class defines the many-to-many mapping for
UnitsandUnitGroups. The mapping may also include an optional qualifier for the mapping.-
qualifier¶ The optional (i.e. may be null) qualifier for the mapping.
-
unit_group_id¶ The reference to the
UnitGroupdatabase table.
-
unit_id¶ The reference to the
Unitdatabase table.
-
-
class
kepler.models.unit.UnitResource(unit_id, resource_id, count)¶ Bases:
sqlalchemy.ext.declarative.api.BaseThe SQLAlchemy declarative model class for a
UnitResourceobject holds information about what resources are needed to be able to reserve the unit.-
count¶ The count of resources needed for the unit.
-
description_tr_id¶ The optional (i.e. can be null) translation ID of the description for the usage and requirement of the resources by the unit.
-
resource_id¶ The reference to the
Resourcedatabase table.
-
unit_id¶ The reference to the
Unitdatabase table.
-
-
class
kepler.models.unit.UnitStatus(unit_id, unit_status_type_id)¶ Bases:
kepler.models.models_meta.ModifiableBase,sqlalchemy.ext.declarative.api.BaseThe class represents a row in the
UnitStatusdatabase table that specifies unit status types for units.-
id¶ The ID of the unit status.
-
modifier_id¶
-
unit_id¶ The reference to the
Unitdatabase table.
-
unit_status_type_id¶ The reference to the
UnitStatusTypedatabase table.
-
-
class
kepler.models.unit.UnitStatusType(name_tr_id)¶ Bases:
sqlalchemy.ext.declarative.api.BaseThe class defines SQLAlchemy model for the status types of units.
-
active¶ Specifies whether the unit status type is active or has been deactivated.
-
id¶ The ID of the unit status type.
-
name_tr_id¶ The translation ID of name of the unit status type.
-
-
class
kepler.models.unit.UnitType(name_tr_id)¶ Bases:
sqlalchemy.ext.declarative.api.BaseThe SQLAlchemy declarative model class for a
UnitTypeobject holds information about the different kinds of types that can be attributed to the units.-
active¶ Specifies whether the unit type is active or has been deactivated.
-
id¶ The ID of the unit type.
-
name_tr_id¶ The translation ID of the name of the unit type.
-