from sqlalchemy import Column, Integer, String, JSON, Float from sqlalchemy.dialects.mysql import DOUBLE from app.models.database import BaseModel class AirflowRun(BaseModel): __tablename__ = "airflow_run" id = Column(Integer, primary_key=True, index=True) start_time = Column(DOUBLE) # 开始时间 end_time = Column(DOUBLE) # 结束时间 job_id = Column(Integer) # 所属任务 af_run_id = Column(String(60)) # run id in airflow run_ts = Column(String(60)) # run timestamp status = Column(Integer) # 0队列中 1运行中 2成功 3失败 details = Column(JSON) # 任务执行详情