mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 06:24:19 +00:00
✨ Add serializer to Condition
This commit is contained in:
parent
0fcbc64191
commit
344544da52
1 changed files with 7 additions and 0 deletions
|
@ -15,3 +15,10 @@ class Condition(Base.Model):
|
|||
used = Base.relationship("Uses", back_populates="condition")
|
||||
tweets = Base.relationship("Contains", back_populates="condition")
|
||||
operations = Base.relationship("BoolOperation", back_populates="condition")
|
||||
|
||||
def to_json(self):
|
||||
return {
|
||||
"id": self.id,
|
||||
"type": self.type,
|
||||
"content": self.content,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue