Files
pickling-mes/backend/app/models/message.py
wangyu 193da0018f feat: 移除PDI和订单号字段,新增设备巡检模块
- 从物料跟踪页面移除订单号列和表单字段
- 从导航菜单移除PDI管理,添加设备巡检
- 新增InspectionLocation和InspectionRecord后端模型和API
- 新增设备巡检前端页面(左侧点位列表,右侧设备和历史记录)
2026-05-27 16:38:40 +08:00

21 lines
939 B
Python

from sqlalchemy import Column, Integer, String, DateTime, Text, Float, func
from app.database import Base
class MessageLog(Base):
"""L1报文日志"""
__tablename__ = "message_logs"
id = Column(Integer, primary_key=True, index=True)
msg_id = Column(String(50), index=True, comment="报文ID")
msg_type = Column(String(30), index=True, comment="报文类型")
direction = Column(String(10), comment="方向: recv/send")
source = Column(String(50), comment="来源系统")
raw_data = Column(Text, comment="原始报文")
parsed_data = Column(Text, comment="解析结果JSON")
status = Column(String(20), default="success", comment="处理状态: success/error")
error_msg = Column(Text, comment="错误信息")
process_time = Column(Float, comment="处理耗时ms")
received_at = Column(DateTime, nullable=False, index=True)
created_at = Column(DateTime, server_default=func.now())