Parkmanne/headers/Park_spot.h

33 lines
577 B
C
Raw Normal View History

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
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 {
public:
2019-05-28 16:46:55 +00:00
int id;
bool taken;
Customer* parked;
2019-06-30 01:30:47 +00:00
Park_spot();
2019-06-30 08:32:01 +00:00
Park_spot(Customer* parked_, int id_, bool taken_);
~Park_spot();
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
};