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.
17 lines
462 B
17 lines
462 B
1 year ago
|
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)
|
||
|
scheduled_time = db.Column(db.DateTime)
|
||
|
|
||
|
def __repr__(self):
|
||
|
return "<Post %r>" % self.id
|