#!/usr/bin/python
# -*- coding: utf-8 -*-
# @version        : 1.0
# @Create Time    : 2025/04/03 10:31
# @File           : project_detect_log_img.py
# @IDE            : PyCharm
# @desc           : pydantic 模型，用于数据库序列化操作

from pydantic import BaseModel, Field, ConfigDict
from core.data_types import DatetimeStr


class ProjectDetectLogImg(BaseModel):
    log_id: int = Field(..., title="None")
    file_name: str = Field(..., title="None")
    image_url: str = Field(..., title="None")


class ProjectDetectLogImgSimpleOut(ProjectDetectLogImg):
    model_config = ConfigDict(from_attributes=True)

    id: int = Field(..., title="编号")
    create_datetime: DatetimeStr = Field(..., title="创建时间")
    update_datetime: DatetimeStr = Field(..., title="更新时间")
