pica/database/schema/transaction.h

35 lines
722 B
C++

//SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <string>
#include <vector>
#include <any>
#include <cstdint>
#include <nlohmann/json.hpp>
namespace DB {
class Transaction {
public:
Transaction ();
Transaction (const std::vector<std::any>& vec);
void parse (const std::vector<std::any>& vec);
nlohmann::json toJSON () const;
public:
uint32_t id;
uint32_t initiator;
// `type` INTEGER UNSIGNED NOT NULL,
uint32_t asset;
uint32_t parent;
double value;
// `state` INTEGER UNSIGNED DEFAULT 0,
uint32_t modified;
uint32_t performed;
// `party` INTEGER UNSIGNED,
std::string notes;
};
}