Spaces:
Sleeping
Sleeping
File size: 772 Bytes
0242ab2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | from datetime import datetime
from sqlalchemy import (
Column,
Integer,
String,
Boolean,
ForeignKey,
DateTime
)
from core.database import Base
class WorkflowSchedule(Base):
__tablename__ = "workflow_schedules"
id = Column(Integer, primary_key=True, index=True)
workflow_id = Column(
Integer,
ForeignKey("workflows.id"),
nullable=False
)
schedule_type = Column(
String(50),
nullable=False
)
run_time = Column(
String(10)
)
day_of_week = Column(
String(20)
)
is_active = Column(
Boolean,
default=True
)
next_run_at = Column(DateTime)
created_at = Column(
DateTime,
default=datetime.utcnow
) |