mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-23 13:34:19 +00:00
14 lines
No EOL
474 B
Python
14 lines
No EOL
474 B
Python
"""
|
|
This module defines the Contains database class.
|
|
"""
|
|
|
|
from ..base import ext
|
|
|
|
|
|
class Contains(ext.Model):
|
|
__tablename__ = "contains"
|
|
cid = ext.Column(ext.Integer, ext.ForeignKey("condition.id"), primary_key=True)
|
|
snowflake = ext.Column(ext.String, ext.ForeignKey("tweet.snowflake"), primary_key=True)
|
|
# Relationships
|
|
condition = ext.relationship("Condition", back_populates="tweets")
|
|
tweet = ext.relationship("Tweet", back_populates="conditions") |