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 <vector>
15
16#include "IRepository.hpp"
17#include "NotificationDTO.hpp"
18
20
21//-----------------------------------------------------
22//
23//-----------------------------------------------------
24class NotificationRepository : public IRepository<NotificationDTO> {
25 public:
26 explicit NotificationRepository(DatabaseExecutor& executor);
27
28 [[nodiscard]] bool create(const NotificationDTO& object) noexcept override;
29
30 [[nodiscard]] bool remove(size_t id) noexcept override;
31
32 [[nodiscard]] NotificationDTO get(size_t id) const noexcept override;
33
34 [[nodiscard]] bool update(const NotificationDTO& object) noexcept override;
35
36 [[nodiscard]] std::vector<NotificationDTO> getAll() const noexcept;
37
38 private:
39 DatabaseExecutor& executor_;
40};
Definition DatabaseExecutor.hpp:14
Definition IRepository.hpp:36
Definition NotificationDTO.hpp:19
NotificationDTO get(size_t id) const noexcept override
Definition NotificationRepository.cpp:80
std::vector< NotificationDTO > getAll() const noexcept
Definition NotificationRepository.cpp:100
bool update(const NotificationDTO &object) noexcept override
Definition NotificationRepository.cpp:59
bool create(const NotificationDTO &object) noexcept override
Definition NotificationRepository.cpp:29
NotificationRepository(DatabaseExecutor &executor)
Definition NotificationRepository.cpp:23
bool remove(size_t id) noexcept override
Definition NotificationRepository.cpp:46