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_content_typeModel(BaseModel):
    """
    讲解内容类型表对应pydantic模型
    """
    model_config = ConfigDict(alias_generator=to_camel, from_attributes=True)

    content_type_id: Optional[int] = Field(default=None, description='主键ID')
    name: Optional[str] = Field(default=None, description='类型名称')
    type_value: Optional[str] = Field(default=None, description='类型值（与讲解内容表中的type对应）')
    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_content_typeQueryModel(Explanation_content_typeModel):
    """
    讲解内容类型不分页查询模型
    """
    pass


@as_query
class Explanation_content_typePageQueryModel(Explanation_content_typeQueryModel):
    """
    讲解内容类型分页查询模型
    """

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


class DeleteExplanation_content_typeModel(BaseModel):
    """
    删除讲解内容类型模型
    """

    model_config = ConfigDict(alias_generator=to_camel)

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