@@ -0,0 +1,679 @@
+from app.model.pgadapter import PgAdapter%0Afrom app.config import get_db_config%0A%0A%0Aclass BaseModel:%0A    db = PgAdapter(get_db_config('develop'))%0A%0A    def __init__(self):%0A        self.__errors = %7B%7D%0A%0A    @property%0A    def validation_errors(self):%0A        return self.__errors%0A%0A    def is_valid(self):%0A        return True if not self.__errors else False%0A%0A    def _clear_validation_error(self, field):%0A        if field in self.__errors.keys():%0A            del self.__errors%5Bfield%5D%0A%0A    def _add_validation_error(self, field, message):%0A        if field in self.__errors.keys():%0A            self.__errors%5Bfield%5D.append(message)%0A        else:%0A            self.__errors%5Bfield%5D = %5Bmessage%5D%0A

add base model