Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String, Binary, Float
from sqlalchemy.orm import relationship, sessionmaker, deferred
from sqlalchemy.orm.collections import attribute_mapped_collection
from sqlalchemy.ext.declarative import declarative_base
from datetime import datetime
Base = declarative_base()
class LocationData(Base):
"""
Location Data for HuskyTrack
Attributes:
uuid: The Location Data's universally unique identifier
uid: The user ID of the user this data belongs to
latitude: The latitude of the device when this measurement was taken
longitude: The longitude of the device when this measurement was taken
accuracy: The accuracy of the measurement as reported by the device
speed: The speed of the device when this measurement was taken
heading: The heading of the device when this measurement was taken
altitude: The altitude of the device when this measurement was taken
timestamp: The time at which this measurement was taken [ISO-8601 UTC]
"""
__tablename__ = 'location_data'
uuid = Column('uuid', String, primary_key=True)
uid = Column('uid', String, nullable=False)
latitude = Column('latitude', Float, nullable=False)
longitude = Column('longitude', Float, nullable=False)
accuracy = Column('accuracy', Float, nullable=False)
speed = Column('speed', Float, nullable=False)
heading = Column('heading', Float, nullable=False)
altitude = Column('altitude', Float, nullable=False)
timestamp = Column('timestamp', String, nullable=False)
def __repr__(self):
return self.uuid