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 Identification_statisticsModel(BaseModel):
    """
    识别统计表对应pydantic模型
    """
    model_config = ConfigDict(alias_generator=to_camel, from_attributes=True)

    id: Optional[int] = Field(default=None, description='主键 自增')
    employ: Optional[int] = Field(default=None, description='员工识别成功数')
    visitor: Optional[int] = Field(default=None, description='访客识别成功数')
    stranger: Optional[int] = Field(default=None, description='位置人员识别失败数')
    create_time: Optional[datetime] = Field(default=None, description='创建时间')
    create_by: Optional[str] = Field(default=None, description='创建者')






class Identification_statisticsQueryModel(Identification_statisticsModel):
    """
    识别统计不分页查询模型
    """
    begin_create_time: Optional[str] = Field(default=None, description='开始创建时间')
    end_create_time: Optional[str] = Field(default=None, description='结束创建时间')


@as_query
class Identification_statisticsPageQueryModel(Identification_statisticsQueryModel):
    """
    识别统计分页查询模型
    """

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


class DeleteIdentification_statisticsModel(BaseModel):
    """
    删除识别统计模型
    """

    model_config = ConfigDict(alias_generator=to_camel)

    ids: str = Field(description='需要删除的主键 自增')
