33 lines
577 B
C++
33 lines
577 B
C++
#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.
|
|
*/
|
|
|
|
class Park_spot {
|
|
public:
|
|
int id;
|
|
bool taken;
|
|
Customer* parked;
|
|
Park_spot();
|
|
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();
|
|
}; |