/** * * {{className}}.h * Created by drogon_ctl * */ <%inc#include "create_model.h" using namespace drogon_ctl; %> #pragma once #include #include #include #include #include using namespace drogon::orm; namespace drogon_model { namespace {{dbName}} { class {{className}} { public: const static std::string primaryKeyName; const static bool hasPrimaryKey; const static std::string tableName; typedef {{primaryKeyType}} PrimaryKeyType; {{className}}(const Row &r) noexcept; <%c++ auto cols=@@.get>("columns"); for(auto col:cols) { $$<<" //For column "< get"< private: <%c++ for(auto col:cols) { if(!col._colType.empty()) $$<<" std::shared_ptr<"< _"< }; } // namespace {{dbName}} } // namespace drogon_model