35 lines
595 B
C++
35 lines
595 B
C++
//
|
|
// 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 {
|
|
class EarnOperation : public Operation {
|
|
public:
|
|
void commit() override;
|
|
|
|
explicit EarnOperation(sqlite3 *db, std::string account);
|
|
|
|
struct Flags : public Operation::Flags {
|
|
long double value;
|
|
std::string description;
|
|
std::string receipt;
|
|
long long date = std::time(nullptr);
|
|
};
|
|
|
|
|
|
Flags flags;
|
|
private:
|
|
std::string account;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //BUDGET_EARNOPERATION_H
|