ActiveRecord mixin for Flask-SQLAlchemy models