1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-26 23:14:19 +00:00
pds-2021-g2-nest/code/backend/nest_backend/database/tables/Composed.py
2021-05-07 19:46:14 +02:00

14 lines
No EOL
479 B
Python

"""
This module defines the Composed database class.
"""
from ..base import ext
class Composed(ext.Model):
__tablename__ = "composed"
rid = ext.Column(ext.Integer, ext.ForeignKey("repository.id"), primary_key=True)
snowflake = ext.Column(ext.String, ext.ForeignKey("tweet.snowflake"), primary_key=True)
# Relationships
repository = ext.relationship("Repository", back_populates="tweets")
tweet = ext.relationship("Tweet", back_populates="repositories")