Skip to content

Commit 5571edb

Browse files
authored
Merge pull request #171 from Targoman/add_filters_for_tickets_get
able to filter tickets by title and body
2 parents b91c270 + 803a710 commit 5571edb

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

Modules/Ticketing/moduleSrc/ORM/Tickets.h

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -91,31 +91,31 @@ namespace tblTickets {
9191

9292
namespace Private {
9393
const QList<clsORMField> ORMFields = {
94-
///ColName Type Validation Default UpBy Sort Filter Self Virt PK
95-
{ Fields::tktID, ORM_PRIMARYKEY_64 },
96-
{ Fields::tktTarget_usrID, S(NULLABLE_TYPE(quint64)), QFV.integer().minValue(1), QNull, UPNone },
97-
{ Fields::tkt_svcID, S(NULLABLE_TYPE(quint32)), QFV.integer().minValue(1), QNull, UPNone },
98-
{ Fields::tkt_untID, S(NULLABLE_TYPE(quint32)), QFV.integer().minValue(1), QNull, UPNone },
99-
{ Fields::tktBase_tktID, S(NULLABLE_TYPE(quint64)), QFV.integer().minValue(1), QNull, UPNone },
100-
{ Fields::tktInReply_tktID, S(NULLABLE_TYPE(quint64)), QFV.integer().minValue(1), QNull, UPNone },
101-
{ Fields::tktType, S(Targoman::API::TicketingModule::enuTicketType::Type), QFV, Targoman::API::TicketingModule::enuTicketType::Message, UPNone },
102-
{ Fields::tktTitle, S(QString), QFV.allwaysValid(), QRequired, UPNone, false, false },
103-
{ Fields::tktBody, S(QString), QFV.allwaysValid(), QRequired, UPNone, false, false },
104-
{ Fields::tktStatus, ORM_STATUS_FIELD(Targoman::API::TicketingModule::enuTicketStatus, Targoman::API::TicketingModule::enuTicketStatus::New) },
105-
{ Fields::tktCreationDateTime, ORM_CREATED_ON },
106-
{ Fields::tktCreatedBy_usrID, ORM_CREATED_BY },
107-
{ Fields::tktUpdatedBy_usrID, ORM_UPDATED_BY },
108-
};
94+
//ColName Type Validation Default UpBy Sort Filter Self Virt PK
95+
{ Fields::tktID, ORM_PRIMARYKEY_64 },
96+
{ Fields::tktTarget_usrID, S(NULLABLE_TYPE(quint64)), QFV.integer().minValue(1), QNull, UPNone },
97+
{ Fields::tkt_svcID, S(NULLABLE_TYPE(quint32)), QFV.integer().minValue(1), QNull, UPNone },
98+
{ Fields::tkt_untID, S(NULLABLE_TYPE(quint32)), QFV.integer().minValue(1), QNull, UPNone },
99+
{ Fields::tktBase_tktID, S(NULLABLE_TYPE(quint64)), QFV.integer().minValue(1), QNull, UPNone },
100+
{ Fields::tktInReply_tktID, S(NULLABLE_TYPE(quint64)), QFV.integer().minValue(1), QNull, UPNone },
101+
{ Fields::tktType, S(Targoman::API::TicketingModule::enuTicketType::Type), QFV, Targoman::API::TicketingModule::enuTicketType::Message, UPNone },
102+
{ Fields::tktTitle, S(QString), QFV.allwaysValid(), QRequired, UPNone },
103+
{ Fields::tktBody, S(QString), QFV.allwaysValid(), QRequired, UPNone },
104+
{ Fields::tktStatus, ORM_STATUS_FIELD(Targoman::API::TicketingModule::enuTicketStatus, Targoman::API::TicketingModule::enuTicketStatus::New) },
105+
{ Fields::tktCreationDateTime, ORM_CREATED_ON },
106+
{ Fields::tktCreatedBy_usrID, ORM_CREATED_BY },
107+
{ Fields::tktUpdatedBy_usrID, ORM_UPDATED_BY },
108+
};
109109

110110
const QList<stuRelation> Relations = {
111-
///Col Reference Table ForeignCol Rename LeftJoin
112-
{ Fields::tktInReply_tktID, R(TicketingSchema, tblTickets::Name), Fields::tktID, "InReply_" , true },
113-
{ Fields::tktTarget_usrID, R(AAASchema, tblUser::Name), tblUser::Fields::usrID, "Target_" , true },
114-
{ Fields::tktID, R(TicketingSchema, tblTicketRead::Name), tblTicketRead::Fields::tkr_tktID, "ReadInfo_", true },
115-
{ Fields::tkt_untID, R(TicketingSchema, tblUnits::Name), tblUnits::Fields::untID },
116-
ORM_RELATION_OF_CREATOR(Fields::tktCreatedBy_usrID),
117-
ORM_RELATION_OF_UPDATER(Fields::tktUpdatedBy_usrID),
118-
};
111+
//Col Reference Table ForeignCol Rename LeftJoin
112+
{ Fields::tktInReply_tktID, R(TicketingSchema, tblTickets::Name), Fields::tktID, "InReply_" , true },
113+
{ Fields::tktTarget_usrID, R(AAASchema, tblUser::Name), tblUser::Fields::usrID, "Target_" , true },
114+
{ Fields::tktID, R(TicketingSchema, tblTicketRead::Name), tblTicketRead::Fields::tkr_tktID, "ReadInfo_", true },
115+
{ Fields::tkt_untID, R(TicketingSchema, tblUnits::Name), tblUnits::Fields::untID },
116+
ORM_RELATION_OF_CREATOR(Fields::tktCreatedBy_usrID),
117+
ORM_RELATION_OF_UPDATER(Fields::tktUpdatedBy_usrID),
118+
};
119119

120120
const QList<stuDBIndex> Indexes = {
121121
};
@@ -146,11 +146,11 @@ namespace tblTicketRead {
146146

147147
namespace Private {
148148
const QList<clsORMField> ORMFields = {
149-
///<ColName Type Validation Default UpBy Sort Filter Self Virt PK
150-
{ Fields::tkr_tktID, ORM_PRIMARYKEY_64},
151-
{ Fields::tkrBy_usrID, S(quint64), QFV.integer().minValue(1), QInvalid, UPNone,false,false},
152-
{ Fields::tkrDateTime, S(TAPI::DateTime_t), QFV.allwaysInvalid(), QInvalid, UPNone,false,false},
153-
};
149+
//<ColName Type Validation Default UpBy Sort Filter Self Virt PK
150+
{ Fields::tkr_tktID, ORM_PRIMARYKEY_64 },
151+
{ Fields::tkrBy_usrID, S(quint64), QFV.integer().minValue(1), QInvalid, UPNone },
152+
{ Fields::tkrDateTime, S(TAPI::DateTime_t), QFV.allwaysInvalid(), QInvalid, UPNone },
153+
};
154154

155155
const QList<stuRelation> Relations = {
156156
};

0 commit comments

Comments
 (0)