Bladeren bron

no message

libushang 8 maanden geleden
bovenliggende
commit
eedfbd585c
1 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 5 5
      models/video_base.py

+ 5 - 5
models/video_base.py

@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from sqlalchemy import String, Column, Integer,DateTime,Text,BigInteger,Boolean,PrimaryKeyConstraint,Index,UniqueConstraint,CHAR,LargeBinary,TIMESTAMP,Double
+from sqlalchemy import String, Column, Integer,DateTime,Text,BigInteger,Boolean,PrimaryKeyConstraint,Index,UniqueConstraint,CHAR,LargeBinary,TIMESTAMP,Float
 from sqlalchemy.dialects.mysql import TINYINT
 from sqlalchemy.sql import func
 from database import Base
@@ -10,7 +10,7 @@ from datetime import datetime
 class TpVideoLog(Base):
     __tablename__ = 'tp_video_log'
 
-    name = Column(String(255, collation='utf8mb4_bin'), nullable=True, default=None)
+    name = Column(String(255, collation='utf8mb4_bin'), autoincrement=True, primary_key=True, nullable=True, default=None)
     area = Column(String(255, collation='utf8mb4_bin'), nullable=True, default=None)
     ip = Column(String(255, collation='utf8mb4_bin'), nullable=True, default=None)
     status = Column(String(255, collation='utf8mb4_bin'), nullable=True, default=None)
@@ -27,7 +27,7 @@ class TpVideoLog(Base):
 class TpVideoBase(Base):
     __tablename__ = 'tp_video_base'
 
-    cameraid = Column(String(100), nullable=True)
+    cameraid = Column(String(100), autoincrement=True, primary_key=True, nullable=True)
     indexcode = Column(String(100), nullable=True)
     name = Column(String(255), nullable=True)
     manufacturer = Column(String(50), nullable=True)
@@ -52,8 +52,8 @@ class TpVideoBase(Base):
     recordpos = Column(String(10), nullable=True)
     cameratype = Column(String(2), nullable=True)
     decodetag = Column(String(10), nullable=True)
-    longitude = Column(Double, nullable=True)
-    latitude = Column(Double, nullable=True)
+    longitude = Column(Float, nullable=True)
+    latitude = Column(Float, nullable=True)
     elevation = Column(String(5), nullable=True)
     targettype = Column(String(2), nullable=True)
     targetsubtype = Column(String(2), nullable=True)