1
0
forked from blue/pica
pica/database/schema/asset.h

34 lines
647 B
C
Raw Permalink Normal View History

//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:
2024-01-22 18:21:55 +00:00
uint32_t id;
uint32_t owner;
uint32_t currency;
std::string title;
std::string icon;
2024-01-22 18:21:55 +00:00
uint32_t color;
// `balance` DECIMAL (20, 5) DEFAULT 0,
// `type` INTEGER UNSIGNED NOT NULL,
bool archived;
};
}