droplet
1.3.0
A multipurpose Discord bot with the hacker in mind
Toggle main menu visibility
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
19
class
DatabaseExecutor
;
20
21
//-----------------------------------------------------
22
//
23
//-----------------------------------------------------
24
class
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
};
IRepository.hpp
NotificationDTO.hpp
DatabaseExecutor
Definition
DatabaseExecutor.hpp:14
IRepository
Definition
IRepository.hpp:36
NotificationDTO
Definition
NotificationDTO.hpp:19
NotificationRepository::get
NotificationDTO get(size_t id) const noexcept override
Definition
NotificationRepository.cpp:80
NotificationRepository::getAll
std::vector< NotificationDTO > getAll() const noexcept
Definition
NotificationRepository.cpp:100
NotificationRepository::update
bool update(const NotificationDTO &object) noexcept override
Definition
NotificationRepository.cpp:59
NotificationRepository::create
bool create(const NotificationDTO &object) noexcept override
Definition
NotificationRepository.cpp:29
NotificationRepository::NotificationRepository
NotificationRepository(DatabaseExecutor &executor)
Definition
NotificationRepository.cpp:23
NotificationRepository::remove
bool remove(size_t id) noexcept override
Definition
NotificationRepository.cpp:46
src
bot_library
persistence
NotificationRepository.hpp
Generated by
1.18.0