mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
added priority column to database.
This commit is contained in:
parent
4b1b351711
commit
34e4578633
1 changed files with 2 additions and 0 deletions
|
@ -50,6 +50,7 @@ class P2PMessage(Base):
|
||||||
timestamp = Column(DateTime)
|
timestamp = Column(DateTime)
|
||||||
status_id = Column(Integer, ForeignKey('status.id'), nullable=True)
|
status_id = Column(Integer, ForeignKey('status.id'), nullable=True)
|
||||||
status = relationship('Status', backref='p2p_messages')
|
status = relationship('Status', backref='p2p_messages')
|
||||||
|
priority = Column(Integer, default=10)
|
||||||
direction = Column(String)
|
direction = Column(String)
|
||||||
statistics = Column(JSON, nullable=True)
|
statistics = Column(JSON, nullable=True)
|
||||||
is_read = Column(Boolean, default=True)
|
is_read = Column(Boolean, default=True)
|
||||||
|
@ -68,6 +69,7 @@ class P2PMessage(Base):
|
||||||
'body': self.body,
|
'body': self.body,
|
||||||
'attachments': [attachment.to_dict() for attachment in self.attachments],
|
'attachments': [attachment.to_dict() for attachment in self.attachments],
|
||||||
'status': self.status.name if self.status else None,
|
'status': self.status.name if self.status else None,
|
||||||
|
'priority': self.priority,
|
||||||
'is_read': self.is_read,
|
'is_read': self.is_read,
|
||||||
'statistics': self.statistics
|
'statistics': self.statistics
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue