budget/src/optHandlers/earnOperation.h

35 lines
595 B
C
Raw Normal View History

2023-01-17 13:39:00 -06:00
//
// Created by quentin on 1/17/23.
//
#ifndef BUDGET_EARNOPERATION_H
#define BUDGET_EARNOPERATION_H
#include "operation.h"
#include <string>
#include <ctime>
namespace Budget::OptHandlers {
2023-01-17 13:47:36 -06:00
class EarnOperation : public Operation {
2023-01-17 13:39:00 -06:00
public:
void commit() override;
explicit EarnOperation(sqlite3 *db, std::string account);
2023-01-17 13:39:00 -06:00
struct Flags : public Operation::Flags {
long double value;
std::string description;
std::string receipt;
long long date = std::time(nullptr);
};
Flags flags;
2023-01-17 14:33:09 -06:00
private:
std::string account;
2023-01-17 13:39:00 -06:00
};
}
#endif //BUDGET_EARNOPERATION_H