修复:CI 部署环境与 ref 错配、迁移碎片化、图片意图 source_span、章节物化脏版式、会话历史与本地语音不一致
新增:TTS 上传 COS 与分片、章节 reading_segments 物化与快照、markdown 清洗、会话消息 repository、语音 store 重构与相关测试
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String, Text
|
||||
from sqlalchemy import (
|
||||
JSON,
|
||||
Boolean,
|
||||
Column,
|
||||
DateTime,
|
||||
ForeignKey,
|
||||
Integer,
|
||||
String,
|
||||
Text,
|
||||
)
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from app.core.db import Base, utc_now
|
||||
@@ -32,9 +41,11 @@ class Segment(Base):
|
||||
conversation_id = Column(String, ForeignKey("conversations.id"), nullable=False)
|
||||
audio_url = Column(String, nullable=True)
|
||||
transcript_text = Column(Text, nullable=False)
|
||||
audio_duration_seconds = Column(Integer, nullable=True)
|
||||
created_at = Column(DateTime(timezone=True), default=utc_now)
|
||||
processed = Column(Boolean, default=False)
|
||||
topic_category = Column(String, nullable=True)
|
||||
agent_response = Column(Text, nullable=True)
|
||||
tts_audio_urls = Column(JSON, nullable=True)
|
||||
|
||||
conversation = relationship("Conversation", back_populates="segments")
|
||||
|
||||
Reference in New Issue
Block a user