Parkmanne/headers/Park_spot.h
2019-07-08 17:57:09 -03:00

33 lines
677 B
C++

#ifndef PARK_SPOT_H
#define PARK_SPOT_H
#pragma once
#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;
int parked_customer;
Vehicle_type v_type;
Park_spot(Vehicle_type v_type_);
Park_spot(int id_, bool taken_, int parked, Vehicle_type v_type_);
void clock(Customer& c_customer);
private:
void save_db();
void update_db();
void delete_db();
int auto_increment_db();
};
#endif // CUSTOMER_H