34 lines
707 B
C++
34 lines
707 B
C++
#ifndef PARK_SPOT_H
|
|
#define PARK_SPOT_H
|
|
#pragma once
|
|
|
|
#include "Customer.h"
|
|
/*
|
|
db representation:
|
|
int id not null
|
|
int taken // the library seems to be having problems with bools as types.
|
|
int customer_id (nullable)
|
|
|
|
Represents a parkspot.
|
|
Has the same kind of db functions, same kind of constructors as previous classes.
|
|
|
|
*/
|
|
|
|
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
|