2017-05-22 03:07:32 +02:00
|
|
|
from titanembeds.database import db
|
|
|
|
|
|
|
|
class UserCSS(db.Model):
|
|
|
|
__tablename__ = "user_css"
|
2017-06-04 07:05:55 +02:00
|
|
|
id = db.Column(db.Integer, primary_key=True) # Auto increment id
|
|
|
|
name = db.Column(db.String(255), nullable=False) # CSS Name
|
2018-01-23 22:08:55 +01:00
|
|
|
user_id = db.Column(db.BigInteger, nullable=False) # Discord client ID of the owner of the css (can edit)
|
2017-09-08 01:35:34 +02:00
|
|
|
css_var_bool = db.Column(db.Boolean(), nullable=False, server_default="0") # If css variables should be taken into consideration
|
|
|
|
css_variables = db.Column(db.Text()) # Customizeable CSS Variables
|
|
|
|
css = db.Column(db.Text().with_variant(db.Text(4294967295), 'mysql')) # CSS contents
|
2017-05-22 03:07:32 +02:00
|
|
|
|
2017-09-08 01:35:34 +02:00
|
|
|
def __init__(self, name, user_id, css_var_bool=False, css_variables=None, css=None):
|
2017-05-22 03:07:32 +02:00
|
|
|
self.name = name
|
|
|
|
self.user_id = user_id
|
2017-09-08 01:35:34 +02:00
|
|
|
self.css_var_bool = css_var_bool
|
2017-06-05 05:32:13 +02:00
|
|
|
self.css_variables = css_variables
|
2017-05-22 03:07:32 +02:00
|
|
|
self.css = css
|