<reponame>leitao-bcc/MovileNext3_Backend_LucasLeitao
from app import db


class BaseModel:

    def save_to_db(self):
        db.session.add(self)
        db.session.commit()

    def delete_from_db(self):
        db.session.delete(self)
        db.session.commit()

    def to_json(self):
        raise NotImplementedError()
