Parkmanne/headers/old/Park_spot.h

34 lines
707 B
C
Raw 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
2019-07-23 14:17:55 +00:00
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.
2019-07-02 00:18:52 +00:00
*/
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