34 lines
647 B
C++
34 lines
647 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 Asset {
|
|
public:
|
|
Asset ();
|
|
Asset (const std::vector<std::any>& vec);
|
|
|
|
void parse (const std::vector<std::any>& vec);
|
|
nlohmann::json toJSON () const;
|
|
|
|
public:
|
|
uint32_t id;
|
|
uint32_t owner;
|
|
uint32_t currency;
|
|
std::string title;
|
|
std::string icon;
|
|
uint32_t color;
|
|
// `balance` DECIMAL (20, 5) DEFAULT 0,
|
|
// `type` INTEGER UNSIGNED NOT NULL,
|
|
bool archived;
|
|
};
|
|
}
|