from sqlalchemy import DateTime, String, BigInteger, Column
from config.database import Base


class IdentificationRecord(Base):
    """
    识别记录表
    """

    __tablename__ = 'identification_record'

    id = Column(BigInteger, primary_key=True, autoincrement=True, nullable=False, comment='主键 自增')
    person_name = Column(String(20), nullable=True, comment='识别人姓名')
    door_name = Column(String(20), nullable=True, comment='门禁点')
    status = Column(String(2), nullable=True, comment='识别结果, 0 拒绝, 1 通过')
    source = Column(String(20), nullable=True, comment='识别来源')
    pic_uri = Column(String(256), nullable=True, comment='图像url')
    create_time = Column(DateTime, nullable=True, comment='创建时间')
    create_by = Column(String(64), nullable=True, comment='创建者')
    conf = Column(BigInteger, default=0, comment='识别置信度')
    person_status = Column(String(2), nullable=True, comment=' 0 陌生人, 1 员工')



