"""admin 反馈页二维码卡配置 schemas。"""
from __future__ import annotations

from pydantic import BaseModel, Field


class FeedbackQrOut(BaseModel):
    enabled: bool
    image_url: str | None = None
    title: str
    group_name: str
    subtitle: str
    updated_at: str | None = None


class FeedbackQrUpdate(BaseModel):
    """改文案/开关(均可选,只改传了的字段;图片走单独的上传/删除接口)。"""

    enabled: bool | None = None
    title: str | None = Field(default=None, max_length=40)
    group_name: str | None = Field(default=None, max_length=40)
    subtitle: str | None = Field(default=None, max_length=60)
