47b44ccaa0
<SRS> SRS02 : Employee Management </SRS> <Changes> - Added Payroll getHeaders, serialize and deserialize functions - Stored payrolls in DataStore - Loaded and saved payrolls along with employees - Linked payroll to employees during creation and load - Added employeeId to Payroll - Renamed TAG role to TALENT_ACQUISITION across the project - Added missing TalentExecutive case in Employee deserialization - Added constructor to TalentExecutive for FileManager integration - Renamed ID counters to m_uid for consistency - Updated salary values in ApplicationConfig </Changes> <Review> Smitha Mohan </Review>
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
#pragma once
|
|
#include <memory>
|
|
#include <map>
|
|
#include "Employee.h"
|
|
#include "Log.h"
|
|
#include "Timestamp.h"
|
|
#include "Admin.h"
|
|
#include "HRManager.h"
|
|
#include "GeneralEmployee.h"
|
|
#include "ITExecutive.h"
|
|
#include "FinanceExecutive.h"
|
|
#include "TeamExecutive.h"
|
|
#include "TalentExecutive.h"
|
|
#include "Team.h"
|
|
#include "Room.h"
|
|
#include "Ticket.h"
|
|
#include "JobListing.h"
|
|
#include "Notification.h"
|
|
#include "Announcement.h"
|
|
#include "Faq.h"
|
|
#include "Payroll.h"
|
|
|
|
using employeeMap = std::map<std::string, std::shared_ptr<Employee>>;
|
|
using payrollMap = std::map<std::string, std::shared_ptr<Payroll>>;
|
|
using logMap = std::map<util::Timestamp, std::shared_ptr<Log>>;
|
|
|
|
class DataStore
|
|
{
|
|
private:
|
|
std::shared_ptr<Employee> m_authenticatedEmployee;
|
|
employeeMap m_employees;
|
|
payrollMap m_payrolls;
|
|
logMap m_logs;
|
|
DataStore() = default;
|
|
public:
|
|
static DataStore& getInstance();
|
|
DataStore(const DataStore&) = delete;
|
|
DataStore& operator=(const DataStore&) = delete;
|
|
DataStore(DataStore&&) = delete;
|
|
DataStore& operator=(DataStore&&) = delete;
|
|
employeeMap& getEmployees();
|
|
payrollMap& getPayrolls();
|
|
logMap& getLogs();
|
|
std::shared_ptr<Employee>& getAuthenticatedEmployee();
|
|
void setAuthenticatedEmployee(std::shared_ptr < Employee>);
|
|
}; |