Player12
An open source football management simulator
Loading...
Searching...
No Matches
StaffRepository Class Reference

Persists every staff member (table Staff; team_id 0 = market). More...

#include <staff_repository.h>

Public Member Functions

 StaffRepository (std::shared_ptr< DatabaseConnection > db_conn)
 
std::vector< StaffMember > loadAll () const
 
void replaceAll (const StaffRoster &roster) const
 

Private Attributes

std::shared_ptr< DatabaseConnection > db_conn
 

Detailed Description

Persists every staff member (table Staff; team_id 0 = market).

Constructor & Destructor Documentation

◆ StaffRepository()

StaffRepository::StaffRepository ( std::shared_ptr< DatabaseConnection >  db_conn)
explicit

Member Function Documentation

◆ loadAll()

std::vector< StaffMember > StaffRepository::loadAll ( ) const

Loads all staff (empty for saves from before staff existed).

◆ replaceAll()

void StaffRepository::replaceAll ( const StaffRoster &  roster) const

Replaces the stored staff (inside the caller's transaction).

Member Data Documentation

◆ db_conn

std::shared_ptr<DatabaseConnection> StaffRepository::db_conn
private

The documentation for this class was generated from the following files: