File size: 537 Bytes
57d0c71 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /**
* @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
|