#pragma once

#include "../databasemanager.h"
#include "../../core/mailitem.h"
#include <QVector>
#include <optional>

class MailItemDao
{
public:
    static bool insert(const MailItem& item);
    static bool update(const MailItem& item);
    static bool remove(qint64 id);
    static std::optional<MailItem> findById(qint64 id);
    static QVector<MailItem> findAll();
    static QVector<MailItem> findByFolderId(int folderId);
    static QVector<MailItem> findByFolderIdSinceUid(int folderId, qint64 sinceUid);
};