2024-04-11 11:52:26 -05:00
|
|
|
//
|
|
|
|
// Created by caleb on 4/8/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef MP4_CALEBFONTENOT_USERDATA_H
|
|
|
|
#define MP4_CALEBFONTENOT_USERDATA_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <boost/serialization/vector.hpp>
|
|
|
|
|
2024-04-12 21:59:01 -05:00
|
|
|
const std::string DASHES = "------------";
|
|
|
|
|
2024-04-11 11:52:26 -05:00
|
|
|
struct userData {
|
|
|
|
std::string name;
|
|
|
|
std::string address;
|
|
|
|
|
|
|
|
std::string city;
|
|
|
|
std::string state;
|
|
|
|
std::string zip;
|
|
|
|
|
|
|
|
std::string phone;
|
|
|
|
|
|
|
|
double accountBal;
|
|
|
|
|
|
|
|
time_t dateOfLastPayment;
|
|
|
|
|
|
|
|
template<class Archive>
|
|
|
|
void serialize(Archive & ar, const unsigned int version){
|
|
|
|
ar & name;
|
|
|
|
ar & address;
|
|
|
|
ar & city;
|
|
|
|
ar & state;
|
|
|
|
ar & zip;
|
|
|
|
ar & phone;
|
|
|
|
ar & accountBal;
|
|
|
|
ar & dateOfLastPayment;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-04-12 21:59:01 -05:00
|
|
|
userData enterRecord();
|
|
|
|
|
|
|
|
userData *findRecord(const std::vector<userData>& data);
|
2024-04-11 11:52:26 -05:00
|
|
|
|
2024-04-12 21:59:01 -05:00
|
|
|
void changeEntry(std::vector<userData>& data);
|
2024-04-11 11:52:26 -05:00
|
|
|
|
2024-04-12 21:59:01 -05:00
|
|
|
void deleteEntry(std::vector<userData>& data);
|
2024-04-11 11:52:26 -05:00
|
|
|
|
|
|
|
std::string displayData(std::vector<userData> data);
|
2024-04-12 21:59:01 -05:00
|
|
|
std::string displayData(const userData& entry);
|
2024-04-11 11:52:26 -05:00
|
|
|
|
|
|
|
std::vector<userData> getData();
|
|
|
|
|
|
|
|
void updateData(std::vector<userData> data);
|
|
|
|
|
2024-04-12 21:59:01 -05:00
|
|
|
std::vector<std::string> structContents(const userData *entry);
|
2024-04-11 11:52:26 -05:00
|
|
|
|
|
|
|
#endif //MP4_CALEBFONTENOT_USERDATA_H
|