from flask_login import UserMixin from . import db from datetime import datetime class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy email = db.Column(db.String(100), unique=True) password = db.Column(db.String(100)) name = db.Column(db.String(1000)) class Tool(db.Model): id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy created = db.Column(db.DateTime, default=datetime.utcnow) name = db.Column(db.Text) description = db.Column(db.Text)