24 lines
468 B
C++
24 lines
468 B
C++
#ifndef ENTITY_H
|
|
#define ENTITY_H
|
|
|
|
#include <string>
|
|
|
|
#include <boost/uuid/uuid.hpp>
|
|
|
|
class Entity
|
|
{
|
|
public:
|
|
enum class State { NEW, UPDATED, READ };
|
|
// Entity();
|
|
virtual ~Entity() = 0;
|
|
const boost::uuids::uuid& getUuid() const { return uuid_; };
|
|
void createUuid();
|
|
void createUuidFromString(const std::string& uuidString);
|
|
State getState();
|
|
|
|
private:
|
|
boost::uuids::uuid uuid_{};
|
|
State state_{State::NEW};
|
|
};
|
|
|
|
#endif // ENTITY_H
|