Player12
An open source football management simulator
Loading...
Searching...
No Matches
inbox_repository.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <memory>
12#include <vector>
13
15#include "model/inbox.h"
16
23{
24 public:
25 explicit InboxRepository(std::shared_ptr<DatabaseConnection> db_conn);
26
28 std::vector<InboxMessage> loadAll() const;
29
31 void replaceAll(const std::vector<InboxMessage>& messages) const;
32
34 InboxView loadView() const;
35
37 void saveView(const InboxView& view) const;
38
39 private:
40 std::shared_ptr<DatabaseConnection> db_conn;
41};
Persists the managed club's inbox (table InboxMessages) and the inbox screen's filters (table InboxVi...
Definition inbox_repository.h:23
InboxView loadView() const
Definition inbox_repository.cpp:102
std::shared_ptr< DatabaseConnection > db_conn
Definition inbox_repository.h:40
void replaceAll(const std::vector< InboxMessage > &messages) const
Definition inbox_repository.cpp:67
void saveView(const InboxView &view) const
Definition inbox_repository.cpp:129
std::vector< InboxMessage > loadAll() const
Definition inbox_repository.cpp:33
Filters of the inbox screen, kept with the career (table InboxView) so they survive a scene change an...
Definition inbox.h:63