hapcat.models¶
Hapcat database models.
-
class
hapcat.models.Event(**kwargs)[source]¶ Bases:
hapcat.models.UUIDObject-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86d5d080; Event>¶
-
__mapper_args__= {'polymorphic_identity': 'event'}¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('event', MetaData(bind=None), Column('id', UUIDType(length=16), ForeignKey('uuidobject.id'), table=<event>, primary_key=True, nullable=False), Column('name', UnicodeText(), table=<event>, nullable=False), Column('rawlocation_id', UUIDType(length=16), ForeignKey('rawlocation.id'), table=<event>, nullable=False), schema=None)¶
-
__tablename__= 'event'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.Event'> at 7f9c86d57548>¶
-
id¶
-
name¶
-
photos¶ A descriptor that presents a read/write view of an object attribute.
-
rawlocation¶
-
rawlocation_id¶
A descriptor that presents a read/write view of an object attribute.
-
type¶
-
-
class
hapcat.models.EventPhoto(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Model-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86d702b0; EventPhoto>¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('event_photo', MetaData(bind=None), Column('event_id', UUIDType(length=16), ForeignKey('event.id'), table=<event_photo>, primary_key=True, nullable=False), Column('photo_id', UUIDType(length=16), ForeignKey('photo.id'), table=<event_photo>, primary_key=True, nullable=False), schema=None)¶
-
__tablename__= 'event_photo'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.EventPhoto'> at 7f9c86d6b9f8>¶
-
event¶
-
event_id¶
-
photo¶
-
photo_id¶
-
-
class
hapcat.models.EventTag(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Model-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86d5d6d8; EventTag>¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('event_tag', MetaData(bind=None), Column('event_id', UUIDType(length=16), ForeignKey('event.id'), table=<event_tag>, primary_key=True, nullable=False), Column('tag_id', UUIDType(length=16), ForeignKey('tag.id'), table=<event_tag>, primary_key=True, nullable=False), schema=None)¶
-
__tablename__= 'event_tag'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.EventTag'> at 7f9c86d57458>¶
-
event¶
-
event_id¶
-
tag¶
-
tag_id¶
-
-
class
hapcat.models.Location(**kwargs)[source]¶ Bases:
hapcat.models.RawLocation-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86dc2588; Location>¶
-
__mapper_args__= {'polymorphic_identity': 'location'}¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('location', MetaData(bind=None), Column('id', UUIDType(length=16), ForeignKey('rawlocation.id'), table=<location>, primary_key=True, nullable=False), Column('name', UnicodeText(), table=<location>, nullable=False), schema=None)¶
-
__tablename__= 'location'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.Location'> at 7f9c86d489a8>¶
-
address¶
-
id¶
-
name¶
-
photos¶ A descriptor that presents a read/write view of an object attribute.
A descriptor that presents a read/write view of an object attribute.
-
type¶
-
-
class
hapcat.models.LocationPhoto(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Model-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86d70898; LocationPhoto>¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('location_photo', MetaData(bind=None), Column('location_id', UUIDType(length=16), ForeignKey('location.id'), table=<location_photo>, primary_key=True, nullable=False), Column('photo_id', UUIDType(length=16), ForeignKey('photo.id'), table=<location_photo>, primary_key=True, nullable=False), schema=None)¶
-
__tablename__= 'location_photo'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.LocationPhoto'> at 7f9c86d6bf48>¶
-
location¶
-
location_id¶
-
photo¶
-
photo_id¶
-
-
class
hapcat.models.LocationTag(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Model-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86dc2908; LocationTag>¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('location_tag', MetaData(bind=None), Column('location_id', UUIDType(length=16), ForeignKey('location.id'), table=<location_tag>, primary_key=True, nullable=False), Column('tag_id', UUIDType(length=16), ForeignKey('tag.id'), table=<location_tag>, primary_key=True, nullable=False), schema=None)¶
-
__tablename__= 'location_tag'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.LocationTag'> at 7f9c86d48f48>¶
-
location¶
-
location_id¶
-
tag¶
-
tag_id¶
-
-
class
hapcat.models.Photo(**kwargs)[source]¶ Bases:
hapcat.models.UUIDObject-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86d5dc50; Photo>¶
-
__mapper_args__= {'polymorphic_identity': 'photo'}¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('photo', MetaData(bind=None), Column('id', UUIDType(length=16), ForeignKey('uuidobject.id'), table=<photo>, primary_key=True, nullable=False), Column('photourl', URLType(), table=<photo>, nullable=False), schema=None)¶
-
__tablename__= 'photo'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.Photo'> at 7f9c86d6b458>¶
-
events¶ A descriptor that presents a read/write view of an object attribute.
-
id¶
-
locations¶ A descriptor that presents a read/write view of an object attribute.
-
photourl¶
-
type¶
-
-
class
hapcat.models.RawLocation(**kwargs)[source]¶ Bases:
hapcat.models.UUIDObject-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86dc2160; RawLocation>¶
-
__mapper_args__= {'polymorphic_identity': 'rawlocation'}¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('rawlocation', MetaData(bind=None), Column('id', UUIDType(length=16), ForeignKey('uuidobject.id'), table=<rawlocation>, primary_key=True, nullable=False), Column('address', UnicodeText(), table=<rawlocation>), schema=None)¶
-
__tablename__= 'rawlocation'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.RawLocation'> at 7f9c86d48548>¶
-
address¶
-
id¶
-
type¶
-
-
class
hapcat.models.Tag(**kwargs)[source]¶ Bases:
hapcat.models.UUIDObject-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c882d7f98; Tag>¶
-
__mapper_args__= {'polymorphic_identity': 'tag'}¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('tag', MetaData(bind=None), Column('id', UUIDType(length=16), ForeignKey('uuidobject.id'), table=<tag>, primary_key=True, nullable=False), Column('name', UnicodeText(), table=<tag>, nullable=False), schema=None)¶
-
__tablename__= 'tag'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.Tag'> at 7f9c86da9db8>¶
-
id¶
-
name¶
-
type¶
-
-
class
hapcat.models.UUIDObject(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Model-
__init__(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
__mapper__= <Mapper at 0x7f9c86d9cac8; UUIDObject>¶
-
__mapper_args__= {'polymorphic_on': Column('type', String(length=32), table=<uuidobject>), 'polymorphic_identity': 'uuidobject'}¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('uuidobject', MetaData(bind=None), Column('id', UUIDType(length=16), table=<uuidobject>, primary_key=True, nullable=False), Column('type', String(length=32), table=<uuidobject>), schema=None)¶
-
__tablename__= 'uuidobject'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.UUIDObject'> at 7f9c86da94a8>¶
-
id¶
-
type¶
-
-
class
hapcat.models.User(id, username, email, date_of_birth, password)[source]¶ Bases:
hapcat.models.UUIDObject-
__init__(id, username, email, date_of_birth, password)¶
-
__mapper__= <Mapper at 0x7f9c86d70ef0; User>¶
-
__mapper_args__= {'polymorphic_identity': 'user'}¶
-
__module__= 'hapcat.models'¶
-
__table__= Table('user', MetaData(bind=None), Column('id', UUIDType(length=16), ForeignKey('uuidobject.id'), table=<user>, primary_key=True, nullable=False), Column('username', UnicodeText(), table=<user>, nullable=False), Column('email', EmailType(length=255), table=<user>, nullable=False), Column('date_of_birth', Date(), table=<user>, nullable=False), Column('password', PasswordType(length=4294967331), table=<user>, nullable=False), schema=None)¶
-
__tablename__= 'user'¶
-
_sa_class_manager= <ClassManager of <class 'hapcat.models.User'> at 7f9c86d7ab38>¶
-
date_of_birth¶
-
email¶
-
id¶
-
password¶
-
type¶
-
username¶
-