代码拉取完成,页面将自动刷新
#include "src/Table.hh"
static int RES_INIT = orm::InitializationOrm();
using namespace std; using namespace orm;
class Tab; //It's best to define each structure at the front, so that there is no need to consider the order later
class Type; D_M_TABLE(Type, Tab);//Delete the intermediate table before deleting the original table(Only FastestDev)
Class(Tab)
uint32_t id;
bool ok;
text<15> name;
tm date;
vector<Type> types;
Type* type;
Tab(uint32_t a = 0, bool b = false, const char* c = "", tm d = now(), vector<Type> e = {}, Type* f = nullptr) :
id(a), ok(b), name(c), date(d), types(e), type(f) {}
~Tab() { type = nullptr; }
FIELD(id, ok, name, date)
CLASS(Tab, id, ok, name, date, types, type)
PROTO(Tab, id, ok, name, date)
REGIST(Tab,
TC::PRIMARY_KEY | TC::AUTO_INCREMENT, "",
TC::DEFAULT, "false",
TC::DEFAULT, "ww'zzgg",
TC::DEFAULT | TC::NOT_NULL, "");
Class(Type)
uint8_t id;
text<10> language;
double bigBlob;
vector<Tab> tabs;
Tab* tab;
Type(uint8_t a = 0, const char* b = "", double c = 0, vector<Tab> d = {}, Tab* e = nullptr) :
id(a), language(b), bigBlob(c), tabs(d), tab(e) {}
~Type() { tab = nullptr; }
FIELD(id, language, bigBlob)
CLASS(Type, id, language, bigBlob, tabs, tab)
PROTO(Type, id, language, bigBlob)
REGIST(Type,
TC::PRIMARY_KEY | TC::AUTO_INCREMENT, "",
TC::DEFAULT, "c/c++",
TC::EMPTY, "");
M_TABLE(Type, id, Tab, id)//Create intermediate table
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。