34 lines
1.4 KiB
Python
34 lines
1.4 KiB
Python
"""
|
||
人员相关表模型
|
||
"""
|
||
|
||
from sqlalchemy import Column, Integer, String, DateTime, func, Text
|
||
from sqlalchemy.ext.declarative import declarative_base
|
||
|
||
Base = declarative_base()
|
||
|
||
|
||
class SurPersonBlacklist(Base):
|
||
"""人员黑名单表"""
|
||
__tablename__ = "sur_person_blacklist"
|
||
|
||
id = Column(Integer, primary_key=True, index=True)
|
||
person_id = Column(Integer, nullable=False, comment="人员ID")
|
||
status = Column(Integer, nullable=False, default=1, comment="状态:0=禁用,1=启用")
|
||
created_time = Column(DateTime, default=func.now(), comment="创建时间")
|
||
updated_time = Column(DateTime, default=func.now(), onupdate=func.now(), comment="更新时间")
|
||
|
||
|
||
class SurFaceFeature(Base):
|
||
"""人脸特征表"""
|
||
__tablename__ = "sur_face_feature"
|
||
|
||
id = Column(Integer, primary_key=True, index=True)
|
||
person_id = Column(Integer, nullable=False, comment="人员ID")
|
||
feature_type = Column(Integer, comment="模型版本")
|
||
feature_data = Column(Text, comment="特征值")
|
||
created_time = Column(DateTime, default=func.now(), comment="创建时间")
|
||
pic_id = Column(String(255), comment="图片ID")
|
||
status = Column(Integer, default=0, comment="人脸特征值计算状态:0=未开始,1=计算中,2=计算成功,3=计算失败")
|
||
start_time = Column(DateTime, comment="特征计算开始时间")
|
||
finish_time = Column(DateTime, comment="特征计算结束时间") |