Added a simple new Model and Controller class.

This commit is contained in:
Relintai 2021-10-31 21:44:44 +01:00
parent 7cfeb13982
commit 304a2a19c9
4 changed files with 75 additions and 0 deletions

18
core/http/controller.cpp Normal file
View File

@ -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() {
}

19
core/http/controller.h Normal file
View File

@ -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

20
core/http/model.cpp Normal file
View File

@ -0,0 +1,20 @@
#include "model.h"
void Model::create_table() {
}
void Model::drop_table() {
}
void Model::migrate() {
}
Model::Model() {
}
Model::~Model() {
}

18
core/http/model.h Normal file
View File

@ -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