Added constructors to construct from db info

This is in no way finished. CHECK TODOs!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This commit is contained in:
TinyAtoms
2019-06-30 00:37:18 -03:00
parent 085cd5af08
commit bf17b82c2e
10 changed files with 136 additions and 124 deletions

View File

@ -1,26 +1,32 @@
#include "Customer.h"
/*
db representation:
int id not null
bool taken not null
int customer_id (null) (many to one, foreign key, whatever)
Dit representeert een parkeerplaats. Het heeft als internal state alleen dat t bezet is of niet.
Dit representeert een parkeerplaats. Het heeft als internal state alleen dat t
bezet is of niet.
*/
class Park_spot {
public:
public:
int id;
bool taken;
Customer* parked;
Park_spot();
~Park_spot();
void clock(Customer* c_customer);
private:
void save_db();
void update_db();
void delete_db();
int auto_increment_db();
void
clock(Customer* c_customer);
private:
void
save_db();
void
update_db();
void
delete_db();
int
auto_increment_db();
};