feat: 2026-07-11 全量更新 - 代办集成+会议室预定+知识迭代修复+UI统一+Bug修复
== 已部署上线 (9项) == - 代办事项真实数据源集成 (企微审批API 8bug修复链) - H5/坐席端 Logo样式统一+绿色背景 - 视频引导页修复 (localStorage key v2) - 坐席端 v9 Vue版本修复 (ElMessage._context) - 截图按钮 v10 修复 (getDisplayMedia user gesture) - 扫码样式恢复+H5扫码登录跳转修复 - H5截图快捷键提示 == 代码完成待部署 (3项) == - 知识迭代3Bug修复 (#8 POST端点/#7 MERGE幂等/#6 过期检查) - 会议室预定-小鱼易联终端 (40文件, 40/40测试通过) - IT资产升级审批推送 (asset_service.py) == 需求文档 (2项) == - 坐席端AI辅助消息框-PRD (4项新功能确认) - 坐席端布局优化建议 v2.0 (7天计划) == 新增文档 == - 日报-2026-07-11.md - 知识迭代Bug修复报告-20260711.md - 会议室预定-部署指南.md - CHANGELOG.md 更新 == 测试 == - test_todo_integration.py: 40/40 - test_meetingroom.py: 40/40 - test_bugfix_ki_suggestions.py: 21/21
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
# =============================================================================
|
||||
# 企微IT智能服务台 — 会议室预定 Pydantic 请求/响应模型
|
||||
# =============================================================================
|
||||
# 说明:定义会议室预定API的请求和响应数据模型
|
||||
# =============================================================================
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# 会议室列表相关
|
||||
# =============================================================================
|
||||
|
||||
class MeetingroomItem(BaseModel):
|
||||
"""会议室信息项。"""
|
||||
|
||||
meetingroom_id: int = Field(..., description="企微会议室ID")
|
||||
name: str = Field(..., description="会议室名称")
|
||||
capacity: int = Field(0, description="容纳人数")
|
||||
location: str = Field("", description="位置描述")
|
||||
devices: List[int] = Field(default_factory=list, description="设备列表")
|
||||
need_approval: int = Field(0, description="是否需要审批(0=不需要, 1=需要)")
|
||||
|
||||
|
||||
class MeetingroomListResponse(BaseModel):
|
||||
"""会议室列表响应数据。"""
|
||||
|
||||
rooms: List[MeetingroomItem] = Field(default_factory=list, description="会议室列表")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# 预定状态查询相关
|
||||
# =============================================================================
|
||||
|
||||
class BookingItem(BaseModel):
|
||||
"""预定记录项。"""
|
||||
|
||||
booking_id: str = Field(..., description="企微预定ID")
|
||||
subject: str = Field("", description="会议主题")
|
||||
booker: str = Field("", description="预定人userid")
|
||||
booker_name: str = Field("", description="预定人姓名")
|
||||
start_time: str = Field(..., description="开始时间(ISO 8601)")
|
||||
end_time: str = Field(..., description="结束时间(ISO 8601)")
|
||||
status: int = Field(0, description="预定状态(0=已预定, 1=已取消)")
|
||||
|
||||
|
||||
class BookingInfoResponse(BaseModel):
|
||||
"""预定状态查询响应数据。"""
|
||||
|
||||
bookings: List[BookingItem] = Field(default_factory=list, description="预定记录列表")
|
||||
|
||||
|
||||
class RoomStatusResponse(BaseModel):
|
||||
"""会议室实时状态响应数据。"""
|
||||
|
||||
status: str = Field(..., description="当前状态(free/busy/starting_soon)")
|
||||
current_meeting: Optional[BookingItem] = Field(None, description="当前进行中的会议")
|
||||
next_meeting: Optional[BookingItem] = Field(None, description="下一个会议")
|
||||
minutes_to_next: Optional[int] = Field(None, description="距下一个会议开始的分钟数")
|
||||
bookings: List[BookingItem] = Field(default_factory=list, description="当日预定列表")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# 预定操作相关
|
||||
# =============================================================================
|
||||
|
||||
class BookRequest(BaseModel):
|
||||
"""预定会议室请求。"""
|
||||
|
||||
meetingroom_id: int = Field(..., description="企微会议室ID")
|
||||
subject: str = Field(..., min_length=1, max_length=200, description="会议主题")
|
||||
start_time: str = Field(..., description="开始时间(ISO 8601)")
|
||||
end_time: str = Field(..., description="结束时间(ISO 8601)")
|
||||
booker: str = Field(..., description="预定人userid")
|
||||
attendees: Optional[List[str]] = Field(None, description="参与人userid列表(可选)")
|
||||
|
||||
|
||||
class BookResponse(BaseModel):
|
||||
"""预定会议室响应数据。"""
|
||||
|
||||
booking_id: str = Field(..., description="企微预定ID")
|
||||
|
||||
|
||||
class CancelRequest(BaseModel):
|
||||
"""取消预定请求。"""
|
||||
|
||||
meetingroom_id: int = Field(..., description="企微会议室ID")
|
||||
|
||||
|
||||
class BookingDetailResponse(BaseModel):
|
||||
"""预定详情响应数据。"""
|
||||
|
||||
booking_id: str = Field(..., description="企微预定ID")
|
||||
subject: str = Field("", description="会议主题")
|
||||
booker: str = Field("", description="预定人userid")
|
||||
booker_name: str = Field("", description="预定人姓名")
|
||||
attendees: List[str] = Field(default_factory=list, description="参与人列表")
|
||||
start_time: str = Field(..., description="开始时间")
|
||||
end_time: str = Field(..., description="结束时间")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# 终端绑定管理相关
|
||||
# =============================================================================
|
||||
|
||||
class TerminalBindingCreate(BaseModel):
|
||||
"""新增终端绑定请求。"""
|
||||
|
||||
terminal_sn: str = Field(..., min_length=1, max_length=64, description="终端序列号")
|
||||
terminal_name: str = Field("", max_length=100, description="终端名称")
|
||||
meetingroom_id: int = Field(..., description="企微会议室ID")
|
||||
meetingroom_name: str = Field("", max_length=100, description="会议室名称")
|
||||
location: str = Field("", max_length=200, description="位置描述")
|
||||
|
||||
|
||||
class TerminalBindingUpdate(BaseModel):
|
||||
"""更新终端绑定请求。"""
|
||||
|
||||
terminal_name: Optional[str] = Field(None, max_length=100, description="终端名称")
|
||||
meetingroom_id: Optional[int] = Field(None, description="企微会议室ID")
|
||||
meetingroom_name: Optional[str] = Field(None, max_length=100, description="会议室名称")
|
||||
location: Optional[str] = Field(None, max_length=200, description="位置描述")
|
||||
is_active: Optional[bool] = Field(None, description="是否启用")
|
||||
|
||||
|
||||
class TerminalBindingResponse(BaseModel):
|
||||
"""终端绑定响应数据。"""
|
||||
|
||||
id: int
|
||||
terminal_sn: str
|
||||
terminal_name: str
|
||||
meetingroom_id: int
|
||||
meetingroom_name: str
|
||||
location: str
|
||||
is_active: bool
|
||||
created_at: str
|
||||
updated_at: str
|
||||
|
||||
|
||||
class TerminalBindingListResponse(BaseModel):
|
||||
"""终端绑定列表响应数据。"""
|
||||
|
||||
list: List[TerminalBindingResponse] = Field(default_factory=list)
|
||||
total: int = 0
|
||||
Reference in New Issue
Block a user