from sqlalchemy import Column, Integer, Text, BigInteger, String, SmallInteger, Boolean, TIMESTAMP from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class QywxEmployee(Base): __tablename__ = "qywx_employee" id = Column(BigInteger, primary_key=True, autoincrement=True, comment="主键id") third_party_user_id = Column(String(32), nullable=True, comment="员工在三方平台ID,唯一") name = Column(String(50), nullable=False, comment="员工姓名") wxid = Column(String(32), nullable=False, comment="员工在企业微信的ID,唯一") status = Column(Integer, nullable=False, comment="员工状态(0: 离职, 1: 在职)") create_time = Column(BigInteger, nullable=True, default=0, comment="创建时间(时间戳)") update_time = Column(BigInteger, nullable=True, default=0, comment="更新时间(时间戳)") agent_name = Column(String(50), nullable=True, comment="作为服务助手时的名字") agent_gender = Column(SmallInteger, nullable=True, comment="作为服务助手时的性别") agent_age = Column(SmallInteger, nullable=True, comment="作为服务助手时的年龄") agent_region = Column(String(50), nullable=True, comment="作为服务助手时的地区") agent_profile = Column(Text, nullable=True, comment="服务助手的画像,JSON字符串") guid = Column(String(50), nullable=True, comment="设备ID")