#pragma once

#include <QString>
#include <QDateTime>

class Folder
{
public:
    Folder() = default;
    Folder(int id, int accountId, const QString& name, const QString& parentFolderId = QString(),
           bool isInbox = false, bool isSent = false, bool isDrafts = false, bool isTrash = false,
           int unreadCount = 0, const QDateTime& lastSynced = QDateTime());

    int id() const { return m_id; }
    void setId(int id) { m_id = id; }

    int accountId() const { return m_accountId; }
    void setAccountId(int accountId) { m_accountId = accountId; }

    QString name() const { return m_name; }
    void setName(const QString& name) { m_name = name; }

    QString parentFolderId() const { return m_parentFolderId; }
    void setParentFolderId(const QString& parentFolderId) { m_parentFolderId = parentFolderId; }

    bool isInbox() const { return m_isInbox; }
    void setInbox(bool inbox) { m_isInbox = inbox; }

    bool isSent() const { return m_isSent; }
    void setSent(bool sent) { m_isSent = sent; }

    bool isDrafts() const { return m_isDrafts; }
    void setDrafts(bool drafts) { m_isDrafts = drafts; }

    bool isTrash() const { return m_isTrash; }
    void setTrash(bool trash) { m_isTrash = trash; }

    int unreadCount() const { return m_unreadCount; }
    void setUnreadCount(int count) { m_unreadCount = count; }

    QDateTime lastSynced() const { return m_lastSynced; }
    void setLastSynced(const QDateTime& lastSynced) { m_lastSynced = lastSynced; }

private:
    int m_id{0};
    int m_accountId{0};
    QString m_name;
    QString m_parentFolderId;
    bool m_isInbox{false};
    bool m_isSent{false};
    bool m_isDrafts{false};
    bool m_isTrash{false};
    int m_unreadCount{0};
    QDateTime m_lastSynced;
};