You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
492 B
16 lines
492 B
from app import db
|
|
|
|
|
|
class Post(db.Model):
|
|
"""post model class for storing a post in crunk-scheduler database"""
|
|
|
|
__tablename__ = "posts"
|
|
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
content = db.Column(db.String, nullable=False)
|
|
files = db.Column(db.String(300), nullable=True, unique=False)
|
|
last_updated = db.Column(db.DateTime(timezone=True))
|
|
scheduled_time = db.Column(db.DateTime(timezone=True))
|
|
|
|
def __repr__(self):
|
|
return "<Post %r>" % self.id
|
|
|