#pragma once
#include <cstdint>
#include <sqlite3.h>
#include <string>

struct ZeverRow
{
    time_t epochTime;
    std::int32_t watt;
    double kilowattPerHour;
};

struct EnvoyRow
{
    time_t epochTime;
    std::int32_t inverterCount;
    std::int32_t currentWatt;
    std::int64_t lifetimeWattHour;
    std::int64_t inverterTime;
};

class Database {
private:
    sqlite3 * connectionPtr;

public:
    bool Insert(ZeverRow & row);
    bool Insert(EnvoyRow & row);

    Database(std::string const & databasePath);
    ~Database();
};