Initial commit — multi-tenant filtering, port constraints, chart bbox
This commit is contained in:
@@ -2,6 +2,7 @@ from sqlalchemy import Column, String, Float, DateTime, Boolean, Integer
|
||||
from sqlalchemy.sql import func
|
||||
from database import Base
|
||||
|
||||
|
||||
class Vessel(Base):
|
||||
__tablename__ = "vessels"
|
||||
|
||||
@@ -44,5 +45,18 @@ class RecordingEvent(Base):
|
||||
inicio = Column(DateTime, nullable=False)
|
||||
fin = Column(DateTime, nullable=True)
|
||||
distancia_min_m = Column(Float, nullable=True)
|
||||
trigger = Column(String) # PROXIMIDAD | PROYECCION
|
||||
trigger = Column(String) # PROXIMIDAD | PROYECCION | MANUAL
|
||||
cerrado = Column(Boolean, default=False)
|
||||
|
||||
|
||||
class AtonTrack(Base):
|
||||
"""Continuous position history for AIS AtoN (Type 21) devices."""
|
||||
__tablename__ = "aton_tracks"
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
mmsi = Column(String, nullable=False, index=True)
|
||||
timestamp = Column(DateTime, server_default=func.now(), index=True)
|
||||
lat = Column(Float, nullable=False)
|
||||
lon = Column(Float, nullable=False)
|
||||
voltage_v = Column(Float, nullable=True)
|
||||
off_position = Column(Boolean, nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user