kepler.models.role module

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

class kepler.models.role.Role(name_tr_id, unit_type_id=None)

Bases: sqlalchemy.ext.declarative.api.Base

The SQLAlchemy declarative model class for a Role object holds information about different kinds of roles a user can have.

id

The ID of the role.

name_tr_id

The translation ID of the name of the role.

unit_type_id

The optional (i.e. can be null) reference to the UnitType database table. Specifies if the role is only applicaple to the certain unit type.

class kepler.models.role.UserRole(user_id, role_id)

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

The SQLAlchemy declarative model class for a UserRole object holds information about which users have which roles.

modifier_id
role_id

The reference to the Role database table.

user_id

The reference to the User database table.