droplet 1.3.0
A multipurpose Discord bot with the hacker in mind
Loading...
Searching...
No Matches
NotificationRepository.hpp
Go to the documentation of this file.
1/*
2 * (c) Copyright erarnitox.de - All rights reserved
3 * Author: Erarnitox <david@erarnitox.de>
4 *
5 * License: MIT License
6 *
7 * Description:
8 *
9 * Documentation: https://droplet.erarnitox.de/doxygen/html/
10 */
11
12#pragma once
13
14#include "IRepository.hpp"
15#include "NotificationDTO.hpp"
16
18
19//-----------------------------------------------------
20//
21//-----------------------------------------------------
22class NotificationRepository : public IRepository<NotificationDTO> {
23 public:
25 explicit NotificationRepository(DatabaseExecutor& executor);
26
27 [[nodiscard]] bool create(const NotificationDTO& object) noexcept override;
28
29 [[nodiscard]] bool remove(size_t id) noexcept override;
30
31 [[nodiscard]] NotificationDTO get(size_t id) const noexcept override;
32
33 [[nodiscard]] bool update(const NotificationDTO& object) noexcept override;
34
35 [[nodiscard]] std::vector<NotificationDTO> getAll() const noexcept;
36
37 private:
38 DatabaseExecutor& executor_;
39};
Definition DatabaseExecutor.hpp:21
Definition IRepository.hpp:36
Definition NotificationDTO.hpp:19
NotificationDTO get(size_t id) const noexcept override
Definition NotificationRepository.cpp:83
std::vector< NotificationDTO > getAll() const noexcept
Definition NotificationRepository.cpp:98
bool update(const NotificationDTO &object) noexcept override
Definition NotificationRepository.cpp:62
bool create(const NotificationDTO &object) noexcept override
Definition NotificationRepository.cpp:32
bool remove(size_t id) noexcept override
Definition NotificationRepository.cpp:49
NotificationRepository()
Definition NotificationRepository.cpp:23