- 复制来源: /home/yueli/track @ 192c8ee (feature/ai-audit-update) - 组织隔离目标: LICA - 端口规划: 前端 8030 / 后端 8031 / 数据库 8032 - 已排除 deploy.sh、deploy_full.sh、docker-compose.prod.yml(IRIS 生产发布脚本) - 已排除工作区未提交改动,取干净的 192c8ee 状态
28 lines
623 B
Python
28 lines
623 B
Python
"""通知 Pydantic Schema"""
|
|
from __future__ import annotations
|
|
import uuid
|
|
from datetime import datetime
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class NotificationResponse(BaseModel):
|
|
"""通知列表响应"""
|
|
id: uuid.UUID
|
|
user_id: str
|
|
title: str
|
|
content: str
|
|
type: str
|
|
task_id: uuid.UUID | None = None
|
|
product_serial_number: str | None = None
|
|
is_read: bool
|
|
created_at: datetime
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class NotificationListResponse(BaseModel):
|
|
"""通知分页列表"""
|
|
notifications: list[NotificationResponse]
|
|
total: int
|
|
unread_count: int
|