2019-05-28 16:46:55 +00:00
|
|
|
#include "Customer.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
db representation:
|
|
|
|
int id not null
|
|
|
|
bool taken not null
|
|
|
|
int customer_id (null) (many to one, foreign key, whatever)
|
2019-06-20 11:08:02 +00:00
|
|
|
|
2019-06-30 03:37:18 +00:00
|
|
|
Dit representeert een parkeerplaats. Het heeft als internal state alleen dat t
|
|
|
|
bezet is of niet.
|
2019-05-28 16:46:55 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class Park_spot {
|
2019-06-30 03:37:18 +00:00
|
|
|
public:
|
2019-05-28 16:46:55 +00:00
|
|
|
int id;
|
|
|
|
bool taken;
|
2019-06-30 02:22:58 +00:00
|
|
|
Customer* parked;
|
2019-06-30 01:30:47 +00:00
|
|
|
Park_spot();
|
2019-06-30 02:22:58 +00:00
|
|
|
~Park_spot();
|
2019-06-30 03:37:18 +00:00
|
|
|
void
|
|
|
|
clock(Customer* c_customer);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void
|
|
|
|
save_db();
|
|
|
|
void
|
|
|
|
update_db();
|
|
|
|
void
|
|
|
|
delete_db();
|
|
|
|
int
|
|
|
|
auto_increment_db();
|
2019-05-28 16:57:33 +00:00
|
|
|
};
|