Files

17 lines
673 B
Python
Raw Permalink Normal View History

2026-04-07 02:04:22 +05:30
"""YakPanel - Crontab model"""
from datetime import datetime
from sqlalchemy import String, Integer, DateTime, Text
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
class Crontab(Base):
__tablename__ = "crontab"
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
name: Mapped[str] = mapped_column(String(128), default="")
type: Mapped[str] = mapped_column(String(32), default="shell")
execstr: Mapped[str] = mapped_column(Text, default="")
schedule: Mapped[str] = mapped_column(String(64), default="")
addtime: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)