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
