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

34 lines
682 B
C
Raw 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:
unsigned int id;
unsigned int owner;
unsigned int currency;
std::string title;
std::string icon;
// `color` INTEGER UNSIGNED DEFAULT 0,
// `balance` DECIMAL (20, 5) DEFAULT 0,
// `type` INTEGER UNSIGNED NOT NULL,
bool archived;
};
}