from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
from pydantic.alias_generators import to_camel
from typing import Optional
from module_admin.annotation.pydantic_annotation import as_query




class Explanation_styleModel(BaseModel):
    """
    讲解风格表对应pydantic模型
    """
    model_config = ConfigDict(alias_generator=to_camel, from_attributes=True)

    explanation_style_id: Optional[int] = Field(default=None, description='主键ID')
    name: Optional[str] = Field(default=None, description='风格名称')
    detail: Optional[str] = Field(default=None, description='风格简介')
    create_time: Optional[datetime] = Field(default=None, description='创建时间')
    create_by: Optional[str] = Field(default=None, description='创建者')
    update_time: Optional[datetime] = Field(default=None, description='修改时间')
    update_by: Optional[str] = Field(default=None, description='修改者')






class Explanation_styleQueryModel(Explanation_styleModel):
    """
    讲解风格不分页查询模型
    """
    begin_create_time: Optional[str] = Field(default=None, description='开始创建时间')
    end_create_time: Optional[str] = Field(default=None, description='结束创建时间')
    begin_update_time: Optional[str] = Field(default=None, description='开始修改时间')
    end_update_time: Optional[str] = Field(default=None, description='结束修改时间')


@as_query
class Explanation_stylePageQueryModel(Explanation_styleQueryModel):
    """
    讲解风格分页查询模型
    """

    page_num: int = Field(default=1, description='当前页码')
    page_size: int = Field(default=10, description='每页记录数')


class DeleteExplanation_styleModel(BaseModel):
    """
    删除讲解风格模型
    """

    model_config = ConfigDict(alias_generator=to_camel)

    explanation_style_ids: str = Field(description='需要删除的主键ID')
