2019-12-29 21:59:11 +00:00
|
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
|
|
|
|
|
|
db = SQLAlchemy()
|
2019-12-22 19:09:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Table(db.Model):
|
2020-03-14 04:55:07 +00:00
|
|
|
id = db.Column(db.Integer, nullable=False, primary_key=True, unique=True, autoincrement=True)
|
2019-12-22 19:09:36 +00:00
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return f"['{self.title}', '{self.icon}', '{self.link}', '{self.id}']"
|
2020-03-14 04:55:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
class User(db.Model):
|
|
|
|
username = db.Column(db.String, nullable=False)
|
|
|
|
email = db.Column(db.String, nullable=False)
|
|
|
|
password = db.Column(db.String, nullable=False)
|
|
|
|
id = db.Column(db.Integer, nullable=False, primary_key=True, unique=True, autoincrement=True)
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return f"['{self.username}', '{self.email}', '{self.password}', '{self.id}']"
|