Parkmanne/headers/Park_spot.h

33 lines
677 B
C
Raw Permalink Normal View History

2019-07-02 00:51:23 +00:00
#ifndef PARK_SPOT_H
#define PARK_SPOT_H
#pragma once
2019-07-02 00:18:52 +00:00
2019-07-02 00:51:23 +00:00
#include "Customer.h"
2019-07-02 00:18:52 +00:00
/*
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;
int parked_customer;
2019-07-06 15:14:18 +00:00
Vehicle_type v_type;
2019-07-08 20:57:09 +00:00
2019-07-06 15:14:18 +00:00
Park_spot(Vehicle_type v_type_);
Park_spot(int id_, bool taken_, int parked, Vehicle_type v_type_);
2019-07-02 00:18:52 +00:00
void clock(Customer& c_customer);
private:
void save_db();
void update_db();
void delete_db();
int auto_increment_db();
};
2019-07-02 00:51:23 +00:00
#endif // CUSTOMER_H