"""
封面背景图 Schema
==================
"""

from pydantic import BaseModel, Field


class CoverBackgroundItem(BaseModel):
    """封面背景图项"""

    id: int
    script_code: str = Field(..., description="脚本大类 code，如 bk")
    title: str | None = Field(default=None, description="背景图名称")
    url: str = Field(..., description="图片 CDN 地址")
    sort_order: int = Field(default=0, description="排序权重")


class CoverBackgroundListResponse(BaseModel):
    """封面背景图列表响应"""

    items: list[CoverBackgroundItem]
