Fixed up database modules in webapp

This commit is contained in:
Jeremy Zhang
2017-06-04 05:05:55 +00:00
parent 91384cd166
commit c76e0a4993
9 changed files with 64 additions and 64 deletions

View File

@ -2,10 +2,10 @@ from titanembeds.database import db
class UserCSS(db.Model):
__tablename__ = "user_css"
id = db.Column(db.Integer, primary_key=True) # Auto increment id
name = db.Column(db.String(255)) # CSS Name
user_id = db.Column(db.String(255)) # Discord client ID of the owner of the css (can edit)
css = db.Column(db.Text()) # CSS contents
id = db.Column(db.Integer, primary_key=True) # Auto increment id
name = db.Column(db.String(255), nullable=False) # CSS Name
user_id = db.Column(db.String(255), nullable=False) # Discord client ID of the owner of the css (can edit)
css = db.Column(db.Text()) # CSS contents
def __init__(self, name, user_id, css=None):
self.name = name