Initial YakPanel commit
This commit is contained in:
16
YakPanel-server/backend/app/models/crontab.py
Normal file
16
YakPanel-server/backend/app/models/crontab.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""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)
|
||||
Reference in New Issue
Block a user