diff --git a/Interfaces/Interfaces.pro b/Interfaces/Interfaces.pro index 713de81a..e61785db 100644 --- a/Interfaces/Interfaces.pro +++ b/Interfaces/Interfaces.pro @@ -43,6 +43,7 @@ PRIVATE_HEADERS += \ HEADERS += \ Helpers/IteratorHelper.hpp \ + ORM/intfFAQ.h \ ORM/intfMigrations.h \ Server/APICallBoom.h \ Server/ServerCommon.h \ @@ -77,6 +78,7 @@ HEADERS += \ ObjectStorage/ObjectStorageManager.h SOURCES += \ + ORM/intfFAQ.cpp \ ORM/intfMigrations.cpp \ Server/APICallBoom.cpp \ Server/ServerCommon.cpp \ diff --git a/Interfaces/ORM/intfFAQ.cpp b/Interfaces/ORM/intfFAQ.cpp new file mode 100644 index 00000000..a28d5027 --- /dev/null +++ b/Interfaces/ORM/intfFAQ.cpp @@ -0,0 +1,101 @@ +/****************************************************************************** +# TargomanAPI: REST API for Targoman +# +# Copyright 2014-2020 by Targoman Intelligent Processing +# +# TargomanAPI is free software: you can redistribute it and/or modify +# it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# TargomanAPI is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# along with Targoman. If not, see . + ******************************************************************************/ +/** + * @author S. Mehran M. Ziabary + * @author Kambiz Zandi + */ + +#include "intfFAQ.h" +#include "Interfaces/AAA/Authorization.h" +#include "Interfaces/AAA/AAADefs.hpp" +#include "Interfaces/AAA/clsJWT.hpp" + +using namespace Targoman::API::AAA; + +namespace Targoman::API::ORM { + +/*********************************************************\ +|** intfFaqQuestions *************************************| +\*********************************************************/ +intfFaqQuestions::intfFaqQuestions( + const QString& _module, + const QString& _schema +) : +intfSQLBasedModule( + _module, + _schema, + tblFaqQuestions::Name, + tblFaqQuestions::Private::ORMFields, + tblFaqQuestions::Private::Relations(_schema), + tblFaqQuestions::Private::Indexes +) { ; } + +QVariant IMPL_ANONYMOUSE_ORMGET(intfFaqQuestions) { + return this->Select(GET_METHOD_ARGS_CALL_INTERNAL_BOOM); +} +quint32 IMPL_ORMCREATE(intfFaqQuestions) { + Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_PUT, this->moduleBaseName())); + return this->Create(CREATE_METHOD_ARGS_CALL_INTERNAL_BOOM); +} + +bool IMPL_ORMUPDATE(intfFaqQuestions) { + Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_PATCH, this->moduleBaseName())); + return this->Update(UPDATE_METHOD_ARGS_CALL_INTERNAL_BOOM); +} + +bool IMPL_ORMDELETE(intfFaqQuestions) { + Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_DELETE, this->moduleBaseName())); + return this->DeleteByPks(DELETE_METHOD_ARGS_CALL_INTERNAL_BOOM); +} + +/*********************************************************\ +|** intfFaqAnswers ***************************************| +\*********************************************************/ +intfFaqAnswers::intfFaqAnswers( + const QString& _module, + const QString& _schema +) : +intfSQLBasedModule( + _module, + _schema, + tblFaqAnswers::Name, + tblFaqAnswers::Private::ORMFields, + tblFaqAnswers::Private::Relations(_schema), + tblFaqAnswers::Private::Indexes +) { ; } + +QVariant IMPL_ANONYMOUSE_ORMGET(intfFaqAnswers) { + return this->Select(GET_METHOD_ARGS_CALL_INTERNAL_BOOM); +} +quint32 IMPL_ORMCREATE(intfFaqAnswers) { + Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_PUT, this->moduleBaseName())); + return this->Create(CREATE_METHOD_ARGS_CALL_INTERNAL_BOOM); +} + +bool IMPL_ORMUPDATE(intfFaqAnswers) { + Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_PATCH, this->moduleBaseName())); + return this->Update(UPDATE_METHOD_ARGS_CALL_INTERNAL_BOOM); +} + +bool IMPL_ORMDELETE(intfFaqAnswers) { + Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_DELETE, this->moduleBaseName())); + return this->DeleteByPks(DELETE_METHOD_ARGS_CALL_INTERNAL_BOOM); +} + +} //namespace Targoman::API::ORM diff --git a/Interfaces/ORM/intfFAQ.h b/Interfaces/ORM/intfFAQ.h new file mode 100644 index 00000000..b9c9639a --- /dev/null +++ b/Interfaces/ORM/intfFAQ.h @@ -0,0 +1,197 @@ +/****************************************************************************** +# TargomanAPI: REST API for Targoman +# +# Copyright 2014-2020 by Targoman Intelligent Processing +# +# TargomanAPI is free software: you can redistribute it and/or modify +# it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# TargomanAPI is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# along with Targoman. If not, see . + ******************************************************************************/ +/** + * @author S. Mehran M. Ziabary + * @author Kambiz Zandi + */ + +#ifndef TARGOMAN_API_FAQ_H +#define TARGOMAN_API_FAQ_H + +#include "Interfaces/API/intfSQLBasedModule.h" + +namespace Targoman::API::ORM { + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + +namespace tblFaqQuestions { + constexpr char Name[] = "tblFaqQuestions"; + + namespace Fields { + TARGOMAN_CREATE_CONSTEXPR(qsnID); + TARGOMAN_CREATE_CONSTEXPR(qsnBody); + } + + namespace Relation { + // constexpr char AAA[] = "aaa"; + } + + namespace Private { + const QList ORMFields = { + //ColName Type Validation Default UpBy Sort Filter Self Virt PK + { Fields::qsnID, ORM_PRIMARYKEY_32 }, + { Fields::qsnBody, S(QString), QFV, QRequired, UPAdmin }, + + }; + + inline const QList Relations(Q_DECL_UNUSED const QString& _schema) { + return { + //Col Reference Table ForeignCol + }; + }; + + const QList Indexes = { + }; + + } //namespace Private + + TAPI_DEFINE_STRUCT(DTO, + SF_quint16 (qsnID), + SF_QString (qsnBody) + ); +} + +namespace tblFaqAnswers { + constexpr char Name[] = "tblFaqAnswers"; + + namespace Fields { + TARGOMAN_CREATE_CONSTEXPR(ansID); + TARGOMAN_CREATE_CONSTEXPR(ans_qsnID); + TARGOMAN_CREATE_CONSTEXPR(ansBody); + } + + namespace Relation { + constexpr char Question[] = "question"; + } + + namespace Private { + const QList ORMFields = { + //ColName Type Validation Default UpBy Sort Filter Self Virt PK + { Fields::ansID, ORM_PRIMARYKEY_32 }, + { Fields::ans_qsnID, S(quint16), QFV, QRequired, UPAdmin }, + { Fields::ansBody, S(QString), QFV, QRequired, UPAdmin }, + }; + + inline const QList Relations(Q_DECL_UNUSED const QString& _schema) { + return { + //Col Reference Table ForeignCol + { Relation::Question, + { Fields::ans_qsnID, R(_schema, tblFaqQuestions::Name), tblFaqQuestions::Fields::qsnID } }, + }; + }; + + const QList Indexes = { + }; + + } //namespace Private + + TAPI_DEFINE_STRUCT(DTO, + SF_quint16 (ansID), + SF_quint16 (ans_qsnID), + SF_QString (ansBody) + ); +} + +#pragma GCC diagnostic pop + +class intfFaqQuestions : public intfSQLBasedModule +{ + Q_OBJECT + +public: + intfFaqQuestions( + const QString& _module, + const QString& _schema + ); + +private slots: + QVariant ANONYMOUSE_ORMGET("Get Faq Questions") + quint32 ORMCREATE("Create a new Faq Question") + bool ORMUPDATE("Update Faq Question") + bool ORMDELETE("Delete a Faq Question") +}; + +class intfFaqAnswers : public intfSQLBasedModule +{ + Q_OBJECT + +public: + intfFaqAnswers( + const QString& _module, + const QString& _schema + ); + +private slots: + QVariant ANONYMOUSE_ORMGET("Get Faq Answers") + quint32 ORMCREATE("Create a new Faq Answer") + bool ORMUPDATE("Update Faq Answer") + bool ORMDELETE("Delete a Faq Answer") +}; + +} //namespace Targoman::API::ORM + +/****************************************************/ +//put this macro before module class definition (.h) +#define TARGOMAN_FAQ_PREPARENT \ + class FaqQuestions; \ + class FaqAnswers; + +//put this macro after module class definition (.h) +#define TARGOMAN_FAQ_POSTPARENT(_module, _schema) \ + class FaqQuestions : public Targoman::API::ORM::intfFaqQuestions \ + { \ + Q_OBJECT \ + TARGOMAN_DEFINE_API_SUBMODULE_WO_CTOR(_module, FaqQuestions) \ + public: \ + FaqQuestions() : \ + intfFaqQuestions( \ + Targoman::Common::demangle(typeid(_module).name()).split("::").last(), \ + _schema \ + ) \ + { ; } \ + }; \ + class FaqAnswers : public Targoman::API::ORM::intfFaqAnswers \ + { \ + Q_OBJECT \ + TARGOMAN_DEFINE_API_SUBMODULE_WO_CTOR(_module, FaqAnswers) \ + public: \ + FaqAnswers() : \ + intfFaqAnswers( \ + Targoman::Common::demangle(typeid(_module).name()).split("::").last(), \ + _schema \ + ) \ + { ; } \ + }; + +//put this macro inside module class definition (.h) after TARGOMAN_DEFINE_API_MODULE +#define TARGOMAN_API_DEFINE_FAQ(_module, _schema) \ + protected: \ + QScopedPointer _FaqQuestions; \ + QScopedPointer _FaqAnswers; + +//put this macro into module class constructor (.cpp) +#define TARGOMAN_API_IMPLEMENT_FAQ(_module, _schema) \ + this->_FaqQuestions.reset(&FaqQuestions::instance()); \ + this->_FaqAnswers.reset(&FaqAnswers::instance()); \ + this->addSubModule(this->_FaqQuestions.data()); \ + this->addSubModule(this->_FaqAnswers.data()); + +/****************************************************/ +#endif // TARGOMAN_API_FAQ_H diff --git a/Interfaces/migrations/faq/db/m20220725_093105_Interfaces_FAQ_init_schema.sql b/Interfaces/migrations/faq/db/m20220725_093105_Interfaces_FAQ_init_schema.sql new file mode 100644 index 00000000..14a01dd7 --- /dev/null +++ b/Interfaces/migrations/faq/db/m20220725_093105_Interfaces_FAQ_init_schema.sql @@ -0,0 +1,25 @@ +/* Migration File: m20220725_093105_Interfaces_FAQ_init_schema.sql */ +/* CAUTION: don't forget to use {{dbprefix}} for schemas */ + +USE `{{dbprefix}}{{Schema}}`; + +CREATE TABLE `tblFaqQuestions` ( + `qsnID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `qsnBody` TEXT NOT NULL COLLATE 'utf8mb4_general_ci', + PRIMARY KEY (`qsnID`) USING BTREE +) +COLLATE='utf8mb4_general_ci' +ENGINE=InnoDB +; + +CREATE TABLE `tblFaqAnswers` ( + `ansID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `ans_qsnID` INT(10) UNSIGNED NOT NULL, + `ansBody` TEXT NOT NULL COLLATE 'utf8mb4_general_ci', + PRIMARY KEY (`ansID`) USING BTREE, + INDEX `FK_tblFaqAnswers_tblFaqQuestions` (`ans_qsnID`) USING BTREE, + CONSTRAINT `FK_tblFaqAnswers_tblFaqQuestions` FOREIGN KEY (`ans_qsnID`) REFERENCES `tblFaqQuestions` (`qsnID`) ON UPDATE NO ACTION ON DELETE CASCADE +) +COLLATE='utf8mb4_general_ci' +ENGINE=InnoDB +; diff --git a/Modules/Account/moduleSrc/Account.cpp b/Modules/Account/moduleSrc/Account.cpp index 565a3ec7..510575ed 100644 --- a/Modules/Account/moduleSrc/Account.cpp +++ b/Modules/Account/moduleSrc/Account.cpp @@ -150,6 +150,7 @@ Account::Account() : TARGOMAN_API_IMPLEMENT_MIGRATIONS(Account, AAASchema) TARGOMAN_API_IMPLEMENT_ACTIONLOG(Account, AAASchema) TARGOMAN_API_IMPLEMENT_OBJECTSTORAGE(Account, AAASchema) + TARGOMAN_API_IMPLEMENT_FAQ(Account, AAASchema) this->addSubModule(&ActiveSessions::instance()); this->addSubModule(&APITokens::instance()); diff --git a/Modules/Account/moduleSrc/Account.h b/Modules/Account/moduleSrc/Account.h index 0f90e48a..ca640880 100644 --- a/Modules/Account/moduleSrc/Account.h +++ b/Modules/Account/moduleSrc/Account.h @@ -34,6 +34,7 @@ #include "ORM/Voucher.h" #include "Classes/Defs.hpp" #include "Payment/PaymentLogic.h" +#include "Interfaces/ORM/intfFAQ.h" namespace Targoman::API::AccountModule { @@ -45,6 +46,7 @@ namespace Targoman::API::AccountModule { TARGOMAN_MIGRATIONS_PREPARENT; TARGOMAN_ACTIONLOG_PREPARENT; TARGOMAN_OBJECTSTORAGE_PREPARENT; +TARGOMAN_FAQ_PREPARENT; class Account : public intfSQLBasedWithActionLogsModule { @@ -56,6 +58,7 @@ class Account : public intfSQLBasedWithActionLogsModule TARGOMAN_API_DEFINE_MIGRATIONS(Account, AAASchema); TARGOMAN_API_DEFINE_ACTIONLOG(Account, AAASchema); TARGOMAN_API_DEFINE_OBJECTSTORAGE(Account, AAASchema); + TARGOMAN_API_DEFINE_FAQ(Account, AAASchema); public: static Targoman::Common::Configuration::tmplConfigurable InvalidPasswordsFile; @@ -526,6 +529,7 @@ private slots: TARGOMAN_MIGRATIONS_POSTPARENT(Account, AAASchema); TARGOMAN_ACTIONLOG_POSTPARENT(Account, AAASchema); TARGOMAN_OBJECTSTORAGE_POSTPARENT(Account, AAASchema); +TARGOMAN_FAQ_POSTPARENT(Account, AAASchema); } //namespace Targoman::API::AccountModule diff --git a/Modules/Advert/moduleSrc/Advert.cpp b/Modules/Advert/moduleSrc/Advert.cpp index 8bd6cfff..18829553 100644 --- a/Modules/Advert/moduleSrc/Advert.cpp +++ b/Modules/Advert/moduleSrc/Advert.cpp @@ -88,6 +88,7 @@ Advert::Advert() : TARGOMAN_API_IMPLEMENT_MIGRATIONS(Advert, AdvertSchema) TARGOMAN_API_IMPLEMENT_ACTIONLOG(Advert, AdvertSchema) TARGOMAN_API_IMPLEMENT_OBJECTSTORAGE(Advert, AdvertSchema) + TARGOMAN_API_IMPLEMENT_FAQ(Advert, AdvertSchema) this->addSubModule(AccountUnits.data()); // this->addSubModule(AccountUnitsTranslate.data()); diff --git a/Modules/Advert/moduleSrc/Advert.h b/Modules/Advert/moduleSrc/Advert.h index d845ada0..f8cc135d 100644 --- a/Modules/Advert/moduleSrc/Advert.h +++ b/Modules/Advert/moduleSrc/Advert.h @@ -32,6 +32,7 @@ #include "Interfaces/AAA/AAA.hpp" #include "ORM/Defs.hpp" #include "Interfaces/AAA/Accounting_Defs.hpp" +#include "Interfaces/ORM/intfFAQ.h" using namespace Targoman::API::AAA; using namespace Targoman::API::ORM; @@ -53,6 +54,7 @@ struct stuAdvertBill { TARGOMAN_MIGRATIONS_PREPARENT; TARGOMAN_ACTIONLOG_PREPARENT; TARGOMAN_OBJECTSTORAGE_PREPARENT; +TARGOMAN_FAQ_PREPARENT; class Advert : public intfAccountingBasedModule { @@ -64,6 +66,7 @@ class Advert : public intfAccountingBasedModule TARGOMAN_API_DEFINE_MIGRATIONS(Advert, AdvertSchema); TARGOMAN_API_DEFINE_ACTIONLOG(Advert, AdvertSchema); TARGOMAN_API_DEFINE_OBJECTSTORAGE(Advert, AdvertSchema); + TARGOMAN_API_DEFINE_FAQ(Advert, AdvertSchema); protected: virtual stuServiceCreditsInfo retrieveServiceCreditsInfo(quint64 _usrID); @@ -173,6 +176,7 @@ protected slots: TARGOMAN_MIGRATIONS_POSTPARENT(Advert, AdvertSchema); TARGOMAN_ACTIONLOG_POSTPARENT(Advert, AdvertSchema); TARGOMAN_OBJECTSTORAGE_POSTPARENT(Advert, AdvertSchema); +TARGOMAN_FAQ_POSTPARENT(Advert, AdvertSchema); } //namespace Targoman::API::AdvertModule diff --git a/Modules/NGT/moduleSrc/NGTv1.cpp b/Modules/NGT/moduleSrc/NGTv1.cpp index 31304495..ff98ad0b 100644 --- a/Modules/NGT/moduleSrc/NGTv1.cpp +++ b/Modules/NGT/moduleSrc/NGTv1.cpp @@ -35,4 +35,5 @@ NGTv1::NGTv1() : ) { TARGOMAN_API_IMPLEMENT_MIGRATIONS(NGTv1Domain, NGTv1Schema) TARGOMAN_API_IMPLEMENT_ACTIONLOG(NGTv1, NGTv1Schema) + TARGOMAN_API_IMPLEMENT_FAQ(NGTv1, NGTv1Schema) } diff --git a/Modules/NGT/moduleSrc/NGTv1.h b/Modules/NGT/moduleSrc/NGTv1.h index 34ad4099..d1d9774c 100644 --- a/Modules/NGT/moduleSrc/NGTv1.h +++ b/Modules/NGT/moduleSrc/NGTv1.h @@ -29,6 +29,7 @@ #include "Interfaces/API/intfSQLBasedWithActionLogsModule.h" #include "Interfaces/AAA/AAA.hpp" #include "ORM/Defs.hpp" +#include "Interfaces/ORM/intfFAQ.h" namespace TAPI { struct stuNGTPriceInfo{ @@ -41,6 +42,7 @@ namespace Targoman::API { TARGOMAN_MIGRATIONS_PREPARENT; TARGOMAN_ACTIONLOG_PREPARENT; +TARGOMAN_FAQ_PREPARENT; class NGTv1 : public intfSQLBasedWithActionLogsModule { @@ -51,6 +53,7 @@ class NGTv1 : public intfSQLBasedWithActionLogsModule TARGOMAN_DEFINE_API_MODULE(NGTv1) TARGOMAN_API_DEFINE_MIGRATIONS(NGTv1, NGTv1Schema); TARGOMAN_API_DEFINE_ACTIONLOG(NGTv1, NGTv1Schema); + TARGOMAN_API_DEFINE_FAQ(NGTv1, NGTv1Schema); private slots: //stuNGTPriceInfo API(POST, RetrievePriceInfo, ()) @@ -58,6 +61,7 @@ private slots: TARGOMAN_MIGRATIONS_POSTPARENT(NGTv1, NGTv1Schema); TARGOMAN_ACTIONLOG_POSTPARENT(NGTv1, NGTv1Schema); +TARGOMAN_FAQ_POSTPARENT(NGTv1, NGTv1Schema); } //namespace Targoman::API diff --git a/Modules/Ticketing/moduleSrc/ORM/Departments.cpp b/Modules/Ticketing/moduleSrc/ORM/Departments.cpp index 9ff2ee83..ec2e49c5 100644 --- a/Modules/Ticketing/moduleSrc/ORM/Departments.cpp +++ b/Modules/Ticketing/moduleSrc/ORM/Departments.cpp @@ -36,8 +36,8 @@ Departments::Departments() : tblDepartments::Private::Indexes ) { ; } -QVariant IMPL_ORMGET(Departments) { - Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_GET, this->moduleBaseName())); +QVariant IMPL_ANONYMOUSE_ORMGET(Departments) { +// Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_GET, this->moduleBaseName())); return this->Select(GET_METHOD_ARGS_CALL_INTERNAL_BOOM); } diff --git a/Modules/Ticketing/moduleSrc/ORM/Departments.h b/Modules/Ticketing/moduleSrc/ORM/Departments.h index ab1567ad..96779b02 100644 --- a/Modules/Ticketing/moduleSrc/ORM/Departments.h +++ b/Modules/Ticketing/moduleSrc/ORM/Departments.h @@ -84,7 +84,7 @@ class Departments : public intfSQLBasedModule TARGOMAN_DEFINE_API_SUBMODULE(Ticketing, Departments) private slots: - QVariant ORMGET("Get departments") + QVariant ANONYMOUSE_ORMGET("Get departments") quint32 ORMCREATE("Create a new department") bool ORMUPDATE("Update department") bool ORMDELETE("Delete a department") diff --git a/Modules/Ticketing/moduleSrc/ORM/Units.cpp b/Modules/Ticketing/moduleSrc/ORM/Units.cpp index c67c8011..4ce32d87 100644 --- a/Modules/Ticketing/moduleSrc/ORM/Units.cpp +++ b/Modules/Ticketing/moduleSrc/ORM/Units.cpp @@ -36,8 +36,8 @@ Units::Units() : tblUnits::Private::Indexes ) { ; } -QVariant IMPL_ORMGET(Units) { - Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_GET, this->moduleBaseName())); +QVariant IMPL_ANONYMOUSE_ORMGET(Units) { +// Authorization::checkPriv(APICALLBOOM_PARAM, this->privOn(EHTTP_GET, this->moduleBaseName())); return this->Select(GET_METHOD_ARGS_CALL_INTERNAL_BOOM); } diff --git a/Modules/Ticketing/moduleSrc/ORM/Units.h b/Modules/Ticketing/moduleSrc/ORM/Units.h index 18278fb6..f292a1c0 100644 --- a/Modules/Ticketing/moduleSrc/ORM/Units.h +++ b/Modules/Ticketing/moduleSrc/ORM/Units.h @@ -89,7 +89,7 @@ class Units : public intfSQLBasedModule TARGOMAN_DEFINE_API_SUBMODULE(Ticketing, Units) private slots: - QVariant ORMGET("Get units") + QVariant ANONYMOUSE_ORMGET("Get units") quint32 ORMCREATE("Create a new unit") bool ORMUPDATE("Update unit") bool ORMDELETE("Delete a unit") diff --git a/Modules/Ticketing/moduleSrc/Ticketing.cpp b/Modules/Ticketing/moduleSrc/Ticketing.cpp index 592e904a..3926d846 100644 --- a/Modules/Ticketing/moduleSrc/Ticketing.cpp +++ b/Modules/Ticketing/moduleSrc/Ticketing.cpp @@ -58,6 +58,7 @@ Ticketing::Ticketing() : TARGOMAN_API_IMPLEMENT_MIGRATIONS(Ticketing, TicketingSchema) TARGOMAN_API_IMPLEMENT_ACTIONLOG(Ticketing, TicketingSchema) TARGOMAN_API_IMPLEMENT_OBJECTSTORAGE(Ticketing, TicketingSchema) + TARGOMAN_API_IMPLEMENT_FAQ(Ticketing, TicketingSchema) this->addSubModule(&Departments::instance()); this->addSubModule(&Units::instance()); diff --git a/Modules/Ticketing/moduleSrc/Ticketing.h b/Modules/Ticketing/moduleSrc/Ticketing.h index 61cf906b..fcb7b74b 100644 --- a/Modules/Ticketing/moduleSrc/Ticketing.h +++ b/Modules/Ticketing/moduleSrc/Ticketing.h @@ -30,6 +30,7 @@ #include "libTargomanCommon/Configuration/tmplConfigurable.h" #include "Interfaces/API/intfSQLBasedWithActionLogsModule.h" #include "ORM/Defs.hpp" +#include "Interfaces/ORM/intfFAQ.h" using namespace Targoman::API::ORM; namespace Targoman::API::TicketingModule { @@ -37,6 +38,7 @@ namespace Targoman::API::TicketingModule { TARGOMAN_MIGRATIONS_PREPARENT; TARGOMAN_ACTIONLOG_PREPARENT; TARGOMAN_OBJECTSTORAGE_PREPARENT; +TARGOMAN_FAQ_PREPARENT; class Ticketing : public intfSQLBasedWithActionLogsModule { @@ -48,6 +50,7 @@ class Ticketing : public intfSQLBasedWithActionLogsModule TARGOMAN_API_DEFINE_MIGRATIONS(Ticketing, TicketingSchema); TARGOMAN_API_DEFINE_ACTIONLOG(Ticketing, TicketingSchema); TARGOMAN_API_DEFINE_OBJECTSTORAGE(Ticketing, TicketingSchema); + TARGOMAN_API_DEFINE_FAQ(Ticketing, TicketingSchema); private: quint64 insertTicket( @@ -118,6 +121,7 @@ protected slots: TARGOMAN_MIGRATIONS_POSTPARENT(Ticketing, TicketingSchema); TARGOMAN_ACTIONLOG_POSTPARENT(Ticketing, TicketingSchema); TARGOMAN_OBJECTSTORAGE_POSTPARENT(Ticketing, TicketingSchema); +TARGOMAN_FAQ_POSTPARENT(Ticketing, TicketingSchema); } //namespace Targoman::API::TicketingModule