2019-06-26 18:12:23 +00:00
|
|
|
#include "headers/data.h"
|
|
|
|
|
|
|
|
namespace data {
|
|
|
|
|
|
|
|
SQLite::Database start_db() {
|
|
|
|
SQLite::Database db("test.db3", SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE);
|
|
|
|
|
|
|
|
db.exec("create table if not exists Customer (id integer primary key, name text, card_code varchar(20), verhicle int)");
|
|
|
|
db.exec("create table if not exists Park_spot (id integer primary key, taken boolean, customer_id int)");
|
2019-06-30 00:50:36 +00:00
|
|
|
db.exec("create table if not exists Park_time (id integer primary key, customer_id int, spot_id int, start int, end int, duration int)");
|
2019-06-26 18:12:23 +00:00
|
|
|
|
|
|
|
return db;
|
|
|
|
}
|
|
|
|
} // namespace data
|