af_run.py 542 B

1234567891011121314151617181920212223242526272829303132333435
  1. from pydantic import BaseModel
  2. class AirflowRunBase(BaseModel):
  3. details: dict
  4. status: int
  5. af_run_id: str
  6. class AirflowRunCreate(AirflowRunBase):
  7. start_time: float
  8. job_id: int
  9. run_ts: str
  10. class AirflowRunUpdate(AirflowRunBase):
  11. pass
  12. # end_time: int
  13. class AirflowRun(AirflowRunBase):
  14. id: int
  15. start_time: float
  16. end_time: float
  17. job_id: int
  18. af_run_id: str
  19. run_ts: str
  20. status: int
  21. class Config:
  22. orm_mode = True
  23. class AirflowTrigger(BaseModel):
  24. parameters: dict