park time can be saved to db now

This commit is contained in:
TinyAtoms
2019-06-29 21:50:36 -03:00
parent a606119626
commit 0eee67d3d9
11 changed files with 82 additions and 37 deletions

View File

@ -1,5 +1,6 @@
#include "thirdparty/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h"
#include "headers/data.h"
#include "headers/Park_spot.h"
#include <iostream>
#include <vector>
#include <string>
@ -23,12 +24,12 @@ De client clockt in en uit bij een spot.
using std::cout;
int main() {
SQLite::Statement test(data::db, "SELECT * FROM Customer WHERE id > 2");
while (test.executeStep()){
int id = test.getColumn(0);
std::string name = test.getColumn(1);
cout << id << ", " << name << std::endl;
class Customer sagar{"nonsense", Verhicle_type::medium};
sagar.update_db();
}
Park_spot p1{1};
p1.clock(&sagar);
p1.clock(&sagar);
sagar.gen_monthly();
}