from flask.cli import FlaskGroup

# from sources.services.web.app import app, db
from .app import app, db
# from project.models.users import User
from project.models.users import User


cli = FlaskGroup(app)


@cli.command("create_db")
def create_db():
    db.drop_all()
    db.create_all()
    db.session.commit()

@cli.command("seed_db")
def seed_db():
    db.session.add(User(email="michael@mherman.org"))
    db.session.commit()


if __name__ == "__main__":
    cli()
