# Path: extrapypi/extensions.py



from sqlalchemy.orm import validates
from extrapypi.extensions import db



class User(db.Model):
    ROLES = [
        'admin',
        'developer',
        'installer',
        'maintainer'
    ]

    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(255), nullable=False, unique=True)
    email = db.Column(db.String(255), nullable=False, unique=True)
    password_hash = db.Column(db.String(255), nullable=False)
    is_active = db.Column(db.Boolean, default=True)

# Path: extrapypi/extensions.py



# Path: extrapypi/models/user.py
from sqlalchemy.orm import validates
from extrapypi.extensions import db




class User(db.Model):
    ROLES = [
        'admin',
        'developer',
        'installer',
        'maintainer'
    ]

    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(255), nullable=False, unique=True)
    email = db.Column(db.String(255), nullable=False, unique=True)
    password_hash = db.Column(db.String(255), nullable=False)
    is_active = db.Column(db.Boolean, default=True)

    role = db.Column(db.String(80), nullable=True)