class User(DB.Model, UserMixin): id = DB.Column(DB.Integer, primary_key=True) username = DB.Column(DB.String(255), unique=True) email = DB.Column(DB.String(255), unique=True) password = DB.Column(DB.String(255)) active = DB.Column(DB.Boolean()) confirmed_at = DB.Column(DB.DateTime()) roles = DB.relationship('Role', secondary=roles_users, backref=DB.backref('users', lazy='dynamic'))
class Role(DB.Model, RoleMixin): id = DB.Column(DB.Integer(), primary_key=True) name = DB.Column(DB.String(80), unique=True) description = DB.Column(DB.String(255))