ai-dev-template / cpp /include /core /models.hpp
Jordandevlog's picture
Upload cpp/include/core/models.hpp
57d0c71 verified
Raw
History Blame Contribute Delete
537 Bytes
/**
* @file models.hpp
* @brief Data models with strong typing.
*/
#pragma once
#include <string>
#include <chrono>
#include <optional>
namespace app::core {
/**
* @brief Base entity with timestamps.
*/
struct BaseEntity {
int id{0};
std::chrono::system_clock::time_point created_at;
std::chrono::system_clock::time_point updated_at;
};
/**
* @brief User entity.
*/
struct User : BaseEntity {
std::string email;
std::string password_hash;
std::optional<std::string> name;
};
} // namespace app::core