#pragma once

#include <QString>
#include <QDateTime>

enum class EventStatus {
    Wait,
    InProgress,
    Complete,
    Unknown
};


inline QString eventStatusToString(const EventStatus type) {
    switch (type) {
        case EventStatus::Wait: return "wait";
        case EventStatus::Complete: return "complete";
        case EventStatus::InProgress: return "iPprogress";
        default: return "unknown";
    }
}

inline EventStatus eventStatusFromString(const QString &str) {
    if (str == "wait") return EventStatus::Wait;
    if (str == "complete") return EventStatus::Complete;
    if (str == "iPprogress") return EventStatus::InProgress;
    return EventStatus::Unknown;
}

struct EventInfo {
    int id = -1;
    int externalId = -1;
    int accountId = -1;
    QString deviceId;

    double amount = 0;
    QString phone;
    QString bankName;

    EventStatus status = EventStatus::Unknown;

    QDateTime updateTime;
    QDateTime completeTime;
    QDateTime timestamp;
};