Esempio n. 1
0
class Platform(Base):
    __tablename__ = 'Platforms'
    tabletype = TableTypes.METADATA

    # These only needed for tables referenced by Entry table
    tabletypeId = 1
    tableName = 'Platforms'

    platform_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    # TODO: does this, or other string limits need checking or validating on file import?
    name = Column(String(150))
    platformtype_id = Column(UUID(), nullable=False)
    host_platform_id = Column(UUID())
    nationality_id = Column(UUID(), nullable=False)
Esempio n. 2
0
class Datafile(Base):
    __tablename__ = 'Datafiles'
    tabletype = TableTypes.METADATA

    # These only needed for tables referenced by Entry table
    tabletypeId = 4
    tableName = 'Datafiles'

    datafile_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    # TODO: does this, or other string limits need checking or validating on file import?
    simulated = Column(Boolean)
    reference = Column(String(150))
    url = Column(String(150))
    privacy_id = Column(UUID(), nullable=False)
    datafiletype_id = Column(UUID(), nullable=False)
Esempio n. 3
0
class DatafileType(Base):
    __tablename__ = 'DatafileTypes'
    tabletype = TableTypes.REFERENCE

    datafiletype_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    # TODO: does this, or other string limits need checking or validating on file import?
    name = Column(String(150), nullable=False)
Esempio n. 4
0
class Entry(Base):
    __tablename__ = 'Entry'
    tabletype = TableTypes.METADATA

    entry_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    tabletype_id = Column(Integer, nullable=False)
    created_user = Column(Integer)
Esempio n. 5
0
class State(Base):
    __tablename__ = 'State'
    tabletype = TableTypes.MEASUREMENT

    # These only needed for tables referenced by Entry table
    tabletypeId = 3
    tableName = 'State'

    state_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    time = Column(DATETIME, nullable=False)
    sensor_id = Column(UUID(), nullable=False)
    # location = Column(Geometry(geometry_type='POINT', srid=4326))
    location = Column(String(150), nullable=False)
    heading = Column(REAL)
    course = Column(REAL)
    speed = Column(REAL)
    datafile_id = Column(UUID(), nullable=False)
    privacy_id = Column(UUID())
Esempio n. 6
0
class Sensor(Base):
    __tablename__ = 'Sensors'
    tabletype = TableTypes.METADATA

    # These only needed for tables referenced by Entry table
    tabletypeId = 2
    tableName = 'Sensor'

    sensor_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    name = Column(String(150), nullable=False)
    sensortype_id = Column(UUID, nullable=False)
    platform_id = Column(UUID, nullable=False)
Esempio n. 7
0
class Privacy(Base):
    __tablename__ = 'Privacies'
    tabletype = TableTypes.REFERENCE

    privacy_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    name = Column(String(150), nullable=False)
Esempio n. 8
0
class Nationality(Base):
    __tablename__ = 'Nationalities'
    tabletype = TableTypes.REFERENCE

    nationality_id = Column(UUID(), primary_key=True, default=uuid.uuid4)
    name = Column(String(150), nullable=False)