Newer
Older
safe-algo-pro / entity / push_config.py
zhangyingjie on 4 Mar 467 bytes 部署版本
from typing import Optional

from sqlmodel import SQLModel, Field

from entity.base import TimestampMixin


class PushConfigBase(SQLModel):
    push_url: str
    push_interval: Optional[int] = 0
    push_type: int


class PushConfig(PushConfigBase, TimestampMixin, table=True):
    __tablename__ = "push_config"  # 显式指定表名
    id: Optional[int] = Field(default=None, primary_key=True)


class PushConfigCreate(PushConfigBase):
    pass