ORE Studio 0.0.4
Loading...
Searching...
No Matches
country.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2025 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_REFDATA_DOMAIN_COUNTRY_HPP
21#define ORES_REFDATA_DOMAIN_COUNTRY_HPP
22
23#include <chrono>
24#include <string>
25#include <optional>
26#include <boost/uuid/uuid.hpp>
27
29
33struct country final {
37 int version = 0;
38
42 std::string alpha2_code;
43
47 std::string alpha3_code;
48
52 std::string numeric_code;
53
57 std::string name;
58
62 std::string official_name;
63
67 std::optional<boost::uuids::uuid> image_id;
68
72 std::string recorded_by;
73
79 std::string change_reason_code;
80
84 std::string change_commentary;
85
89 std::chrono::system_clock::time_point recorded_at;
90};
91
92}
93
94#endif
Domain types for risk management.
Definition country.hpp:28
Represents a country using ISO 3166-1 standard codes.
Definition country.hpp:33
std::string alpha3_code
ISO 3166-1 alpha-3 code (e.g., "USA", "GBR").
Definition country.hpp:47
std::string change_commentary
Free-text commentary explaining the change.
Definition country.hpp:84
std::string alpha2_code
ISO 3166-1 alpha-2 code (e.g., "US", "GB").
Definition country.hpp:42
std::string official_name
Official name of the country (e.g., "United States of America").
Definition country.hpp:62
std::string numeric_code
ISO 3166-1 numeric code (e.g., "840", "826").
Definition country.hpp:52
std::optional< boost::uuids::uuid > image_id
Optional reference to a flag image in the images table.
Definition country.hpp:67
std::chrono::system_clock::time_point recorded_at
Timestamp when this version of the record was recorded in the system.
Definition country.hpp:89
std::string name
Short name of the country (e.g., "United States").
Definition country.hpp:57
std::string recorded_by
Username of the person who recorded this version in the system.
Definition country.hpp:72
int version
Version number for optimistic locking and change tracking.
Definition country.hpp:37
std::string change_reason_code
Code identifying the reason for the change.
Definition country.hpp:79