|
ORE Studio 0.0.4
|
Represents a session record in the database. More...
#include <session_entity.hpp>

Public Attributes | |
| sqlgen::PrimaryKey< std::string > | id |
| Session UUID - part of composite primary key. | |
| std::string | account_id |
| Foreign key to accounts table. | |
| sqlgen::PrimaryKey< sqlgen::Timestamp<"%Y-%m-%d %H:%M:%S"> > | start_time |
| Session start timestamp - part of composite primary key. | |
| std::string | end_time |
| Session end timestamp. Empty string if session is active. | |
| std::string | client_ip |
| Client IP address (IPv4 or IPv6). | |
| std::string | client_identifier |
| Client application identifier from handshake. | |
| int | client_version_major = 0 |
| Client protocol version major number. | |
| int | client_version_minor = 0 |
| Client protocol version minor number. | |
| std::int64_t | bytes_sent = 0 |
| Total bytes sent to client. | |
| std::int64_t | bytes_received = 0 |
| Total bytes received from client. | |
| std::string | country_code |
| ISO 3166-1 alpha-2 country code. | |
| std::string | protocol = "binary" |
| Protocol used for this session (binary or http). | |
Static Public Attributes | |
| static constexpr const char * | schema = "production" |
| static constexpr const char * | tablename = "iam_sessions_tbl" |
Represents a session record in the database.
This entity maps to a TimescaleDB hypertable partitioned by start_time for efficient time-series queries.
| sqlgen::PrimaryKey<sqlgen::Timestamp<"%Y-%m-%d %H:%M:%S"> > start_time |
Session start timestamp - part of composite primary key.
Required in primary key for TimescaleDB hypertable partitioning.
| std::string end_time |
Session end timestamp. Empty string if session is active.
Uses std::string instead of std::optional because sqlgen doesn't support optional types in UPDATE SET operations. Empty string represents NULL/active session in the database.