43 lines
981 B
C++
43 lines
981 B
C++
//
|
|
// Created by selim on 03.10.22.
|
|
//
|
|
|
|
#ifndef AUTOCAT_GNOME_VEHICLE_H
|
|
#define AUTOCAT_GNOME_VEHICLE_H
|
|
|
|
#include "../services/IDBEntity.h"
|
|
#include "Engine.h"
|
|
#include "JsonOptional.h"
|
|
|
|
#include <optional>
|
|
#include <sqlite3.h>
|
|
|
|
class Vehicle: public IDBEntity {
|
|
public:
|
|
std::string number;
|
|
std::string currentNumber;
|
|
std::optional<std::string> color;
|
|
std::string category;
|
|
int year;
|
|
double addedDate;
|
|
double updatedDate;
|
|
std::string vin1;
|
|
std::optional<std::string> vin2;
|
|
std::string sts;
|
|
std::string pts;
|
|
std::string addedBy;
|
|
Engine engine;
|
|
|
|
public:
|
|
Vehicle() = default;
|
|
explicit Vehicle(sqlite3_stmt* stmt);
|
|
static std::string createTableQuery();
|
|
static std::string selectQuery();
|
|
std::string insertQuery() override;
|
|
|
|
NLOHMANN_JSONIFY_ALL_THINGS(Vehicle, number, currentNumber, color, category, year, addedDate, updatedDate, vin1, vin2, sts, pts, addedBy, engine)
|
|
};
|
|
|
|
|
|
#endif //AUTOCAT_GNOME_VEHICLE_H
|