mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 21:14:18 +00:00
013ce17aa8
All initial database classes are now properly implemented. Hurray!
16 lines
No EOL
605 B
Python
16 lines
No EOL
605 B
Python
"""
|
|
This module defines the Tweet database class.
|
|
"""
|
|
|
|
from ..base import Base
|
|
|
|
|
|
class Tweet(Base.Model):
|
|
__tablename__ = "tweet"
|
|
snowflake = Base.Column(Base.String, primary_key=True)
|
|
content = Base.Column(Base.String)
|
|
location = Base.Column(Base.String) # Todo: see if a dedicated class for locations is needed. This is likely.
|
|
poster = Base.Column(Base.String) # Todo: see if a dedicated class for posters is needed.
|
|
# Relationships
|
|
repositories = Base.relationship("Composed", back_populates="tweet")
|
|
conditions = Base.relationship("Contains", back_populates="tweet") |