MCPcopy Create free account
hub / github.com/Spinachead/arg / ThreadModel

Class ThreadModel

app/db/models/thread_model.py:5–20  ·  view source on GitHub ↗

对话线程模型

Source from the content-addressed store, hash-verified

3from db.base import Base
4
5class ThreadModel(Base):
6 """
7 对话线程模型
8 """
9 __tablename__ = "threads"
10
11 id = Column(UUID(as_uuid=False), primary_key=True, comment="线程ID")
12 createdAt = Column(String(50), name="createdAt", comment="创建时间")
13 name = Column(String(255), comment="线程名称")
14 userId = Column(UUID(as_uuid=False), ForeignKey("users.id", ondelete="CASCADE"), name="userId", comment="用户ID")
15 userIdentifier = Column(String(255), name="userIdentifier", comment="用户标识符")
16 tags = Column(JSONB, comment="标签")
17 metadata_ = Column(JSONB, name="metadata", comment="元数据")
18
19 def __repr__(self):
20 return f"<Thread(id='{self.id}', name='{self.name}', userId='{self.userId}', createdAt='{self.createdAt}')>"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected