From 304a2a19c9b8efcab41855d5e971f4680f065fdf Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 31 Oct 2021 21:44:44 +0100 Subject: [PATCH] Added a simple new Model and Controller class. --- core/http/controller.cpp | 18 ++++++++++++++++++ core/http/controller.h | 19 +++++++++++++++++++ core/http/model.cpp | 20 ++++++++++++++++++++ core/http/model.h | 18 ++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 core/http/controller.cpp create mode 100644 core/http/controller.h create mode 100644 core/http/model.cpp create mode 100644 core/http/model.h diff --git a/core/http/controller.cpp b/core/http/controller.cpp new file mode 100644 index 0000000..b79bdb5 --- /dev/null +++ b/core/http/controller.cpp @@ -0,0 +1,18 @@ + +#include "controller.h" + +#include "request.h" + +void Controller::handle_request_main(Request *request) { +} + +void Controller::create_validators() { +} + + +Controller::Controller() { + create_validators(); +} + +Controller::~Controller() { +} \ No newline at end of file diff --git a/core/http/controller.h b/core/http/controller.h new file mode 100644 index 0000000..3e7e6f9 --- /dev/null +++ b/core/http/controller.h @@ -0,0 +1,19 @@ +#ifndef HTTP_CONTROLLER_H +#define HTTP_CONTROLLER_H + +#include "core/object.h" + +class Request; + +class Controller : public Object { +public: + virtual void handle_request_main(Request *request); + virtual void create_validators(); + + Controller(); + ~Controller(); + +protected: +}; + +#endif \ No newline at end of file diff --git a/core/http/model.cpp b/core/http/model.cpp new file mode 100644 index 0000000..02f2ec5 --- /dev/null +++ b/core/http/model.cpp @@ -0,0 +1,20 @@ + +#include "model.h" + +void Model::create_table() { + +} + +void Model::drop_table() { + +} + +void Model::migrate() { + +} + +Model::Model() { +} + +Model::~Model() { +} \ No newline at end of file diff --git a/core/http/model.h b/core/http/model.h new file mode 100644 index 0000000..7622cd0 --- /dev/null +++ b/core/http/model.h @@ -0,0 +1,18 @@ +#ifndef HTTP_MODEL_H +#define HTTP_MODEL_H + +#include "core/object.h" + +class Model : public Object { +public: + virtual void create_table(); + virtual void drop_table(); + virtual void migrate(); + + Model(); + ~Model(); + +protected: +}; + +#endif \ No newline at end of file