Skip to content

Commit

Permalink
Merge pull request #252 from Targoman/complete_accounting_usage
Browse files Browse the repository at this point in the history
Complete accounting usage
  • Loading branch information
kambizzandi authored Oct 30, 2022
2 parents 013f531 + ff42640 commit 7b5185c
Show file tree
Hide file tree
Showing 29 changed files with 1,136 additions and 206 deletions.
61 changes: 57 additions & 4 deletions Interfaces/AAA/Accounting_Defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,23 @@ TARGOMAN_DEFINE_ENUM(enuVoucherItemProcessStatus,
Removed = 'R',
);

TARGOMAN_DEFINE_ENUM(enuAssetHistoryReportStepUnit,
Minute = 'I',
Hour = 'H',
Day = 'D',
// Week = 'W',
// Month = 'M',
// Year = 'Y',
);

} //namespace Targoman::API::AAA

TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuVoucherType); // -> TAPI_REGISTER_TARGOMAN_ENUM() in Accounting_Interfaces.cpp
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuVoucherStatus) // -> TAPI_REGISTER_TARGOMAN_ENUM() in Accounting_Interfaces.cpp
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuDiscountType) // -> TAPI_REGISTER_TARGOMAN_ENUM() in Accounting_Interfaces.cpp
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuVoucherItemProcessStatus) // -> TAPI_REGISTER_TARGOMAN_ENUM() in Accounting_Interfaces.cpp
//TAPI_REGISTER_TARGOMAN_ENUM() in Accounting_Interfaces.cpp:
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuVoucherType);
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuVoucherStatus);
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuDiscountType);
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuVoucherItemProcessStatus);
TAPI_DECLARE_METATYPE_ENUM(Targoman::API::AAA, enuAssetHistoryReportStepUnit);

namespace Targoman::API::AAA {

Expand Down Expand Up @@ -273,6 +284,15 @@ namespace tblAccountAssetUsageBase {
}
}

namespace tblAccountAssetUsageHistoryBase {
constexpr char Name[] = "tblAccountAssetUsageHistory";

namespace Fields {
TARGOMAN_CREATE_CONSTEXPR(ush_uasID);
TARGOMAN_CREATE_CONSTEXPR(ushLastDateTime);
}
}

///@TODO: max usage count (user, system)
///@TODO: CodeCommentMark
namespace tblAccountCouponsBase {
Expand Down Expand Up @@ -855,6 +875,39 @@ namespace tblAccountAssetUsageBase {
);
}

namespace tblAccountAssetUsageHistoryBase {
namespace Relation {
// constexpr char AAA[] = "aaa";
}

namespace Private {
const QList<clsORMField> ORMFields = {
//ColName Type Validation Default UpBy Sort Filter Self Virt PK
{ Fields::ush_uasID, ORM_PRIMARYKEY_64 },
{ Fields::ushLastDateTime, S(TAPI::DateTime_t), QFV, QRequired, UPAdmin },
};

inline const QList<stuRelation> Relations(Q_DECL_UNUSED const QString& _schema) {
return {
//Col Reference Table ForeignCol Rename LeftJoin
{ Fields::ush_uasID, R(_schema, tblAccountUserAssetsBase::Name), tblAccountUserAssetsBase::Fields::uasID },
};
};

const QList<stuDBIndex> Indexes = {
};

} //namespace Private

#define SF_tblAccountAssetUsageHistoryBase_DTO \
SF_ORM_PRIMARYKEY_64 (ush_uasID), \
SF_DateTime_t (ushLastDateTime)

TAPI_DEFINE_STRUCT(DTO,
SF_tblAccountAssetUsageHistoryBase_DTO
);
}

namespace tblAccountCouponsBase {
namespace Relation {
// constexpr char AAA[] = "aaa";
Expand Down
Loading

0 comments on commit 7b5185c

Please sign in to comment.