From 776276d5c7e67356a880f3e31076d32cdc1c1882 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Tue, 10 Nov 2026 11:29:58 +0300 Subject: publish --- src/transaction.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/transaction.h (limited to 'src/transaction.h') diff --git a/src/transaction.h b/src/transaction.h new file mode 100644 index 0000000..709b242 --- /dev/null +++ b/src/transaction.h @@ -0,0 +1,26 @@ +// transaction.h +#ifndef INCLUDED_TRANSACTION_H +#define INCLUDED_TRANSACTION_H + +#include + +typedef uint32_t merchant_city_id_t; + +struct transaction { + union transaction_key { + uint64_t packed; + struct { + uint32_t merchant_city_id; + uint16_t client_id; + uint16_t year_month; // year << 4 + month + }; + } key; + union { + int32_t value; + int32_t sum; + float normalized; + }; +}; + +#endif // INCLUDED_TRANSACTION_H +// transaction.h ends here -- cgit v1.3.1