aboutsummaryrefslogtreecommitdiff
path: root/mappings.py
diff options
context:
space:
mode:
Diffstat (limited to 'mappings.py')
-rw-r--r--mappings.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mappings.py b/mappings.py
index e80756f..ae1f0b5 100644
--- a/mappings.py
+++ b/mappings.py
@@ -1,5 +1,5 @@
"""Database for project."""
-from sqlalchemy import Column, Integer, String, create_engine
+from sqlalchemy import Column, Integer, String, create_engine, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
@@ -18,14 +18,16 @@ class Message(Base):
type = Column(String)
username = Column(String)
text = Column(String)
+ timestamp = Column(DateTime)
# ----------------------------------------------------------------------
- def __init__(self, iid, type, username, text):
+ def __init__(self, iid, type, username, text, timestamp):
"""Create record."""
self.iid = iid
self.type = type
self.username = username
self.text = text
+ self.timestamp = timestamp
def create_tables():