注册任务表
| 107 | |
| 108 | |
| 109 | class RegistrationTask(Base): |
| 110 | """注册任务表""" |
| 111 | __tablename__ = 'registration_tasks' |
| 112 | |
| 113 | id = Column(Integer, primary_key=True, autoincrement=True) |
| 114 | task_uuid = Column(String(36), unique=True, nullable=False, index=True) # 任务唯一标识 |
| 115 | status = Column(String(20), default='pending') # 'pending', 'running', 'completed', 'failed', 'cancelled' |
| 116 | email_service_id = Column(Integer, ForeignKey('email_services.id'), index=True) # 使用的邮箱服务 |
| 117 | proxy = Column(String(255)) # 使用的代理 |
| 118 | logs = Column(Text) # 注册过程日志 |
| 119 | result = Column(JSONEncodedDict) # 注册结果 |
| 120 | error_message = Column(Text) |
| 121 | created_at = Column(DateTime, default=utcnow_naive) |
| 122 | started_at = Column(DateTime) |
| 123 | completed_at = Column(DateTime) |
| 124 | |
| 125 | # 关系 |
| 126 | email_service = relationship('EmailService') |
| 127 | |
| 128 | |
| 129 | class BindCardTask(Base): |
no outgoing calls