summaryrefslogtreecommitdiff
path: root/animism-align/cli/app/sql/models/timestamp.py
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/cli/app/sql/models/timestamp.py')
-rw-r--r--animism-align/cli/app/sql/models/timestamp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/animism-align/cli/app/sql/models/timestamp.py b/animism-align/cli/app/sql/models/timestamp.py
index 60e9007..c2bf410 100644
--- a/animism-align/cli/app/sql/models/timestamp.py
+++ b/animism-align/cli/app/sql/models/timestamp.py
@@ -11,9 +11,10 @@ from app.settings import app_cfg
class Timestamp(Base):
"""Table for storing references to graphs"""
- __tablename__ = 'graph'
+ __tablename__ = 'timestamp'
id = Column(Integer, primary_key=True)
type = Column(String(16, convert_unicode=True), nullable=False)
+ paragraph_id = Column(Integer, ForeignKey('paragraph.id'), nullable=True)
start_ts = Column(Float, nullable=False)
end_ts = Column(Float, nullable=True)
sentence = Column(Text(convert_unicode=True), nullable=True)
@@ -23,6 +24,7 @@ class Timestamp(Base):
return {
'id': self.id,
'type': self.type,
+ 'paragraph_id': self.paragraph_id,
'start_ts': self.start_ts,
'end_ts': self.end_ts,
'sentence': self.description,