mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
/*!
|
|
*
|
|
* \author: einhornimmond
|
|
*
|
|
* \date: 25.10.19
|
|
*
|
|
* \brief: Creation Transaction
|
|
*/
|
|
#ifndef GRADIDO_LOGIN_SERVER_MODEL_TRANSACTION_CREATION_INCLUDE
|
|
#define GRADIDO_LOGIN_SERVER_MODEL_TRANSACTION_CREATION_INCLUDE
|
|
|
|
#include "TransactionBase.h"
|
|
#include "../proto/gradido/TransactionCreation.pb.h"
|
|
#include "User.h"
|
|
|
|
class TransactionCreation : public TransactionBase
|
|
{
|
|
public:
|
|
TransactionCreation(const std::string& memo, const model::messages::gradido::TransactionCreation& protoCreation);
|
|
~TransactionCreation();
|
|
|
|
int prepare();
|
|
|
|
inline User* getUser() { return mReceiverUser; }
|
|
inline google::protobuf::int64 getAmount() { return mProtoCreation.receiveramount().amount(); }
|
|
inline char* getPublicHex() { return mReceiverPublicHex; }
|
|
|
|
inline std::string getAmountString() { return amountToString(getAmount()); }
|
|
|
|
protected:
|
|
const model::messages::gradido::TransactionCreation& mProtoCreation;
|
|
char mReceiverPublicHex[65];
|
|
User* mReceiverUser;
|
|
};
|
|
|
|
#endif //GRADIDO_LOGIN_SERVER_MODEL_TRANSACTION_CREATION_INCLUDE
|