mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
add author_id to NewChatMessage model
This commit is contained in:
parent
4d024219cb
commit
d89bcf13c3
1 changed files with 10 additions and 1 deletions
|
|
@ -412,8 +412,17 @@ class NewChatMessage(BaseModel, TimestampMixin):
|
|||
index=True,
|
||||
)
|
||||
|
||||
# Relationship
|
||||
# Track who sent this message (for shared chats)
|
||||
author_id = Column(
|
||||
UUID(as_uuid=True),
|
||||
ForeignKey("user.id", ondelete="SET NULL"),
|
||||
nullable=True,
|
||||
index=True,
|
||||
)
|
||||
|
||||
# Relationships
|
||||
thread = relationship("NewChatThread", back_populates="messages")
|
||||
author = relationship("User")
|
||||
|
||||
|
||||
class Document(BaseModel, TimestampMixin):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue