qywx_employee.py 1.4 KB

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