17 #ifndef GIGA_DATA_USER_MODEL_H_
18 #define GIGA_DATA_USER_MODEL_H_
20 #include <cpprest/details/basic_types.h>
23 #include "../../rest/prepoc_manage.h"
27 #include "ExternalAccount.h"
38 utility::string_t login = {};
43 utility::string_t activity = {};
44 bool isUnlimited = {};
45 boost::optional<utility::string_t> gender = boost::none;
47 boost::optional<utility::string_t>
birthDate = boost::none;
48 boost::optional<utility::string_t> description = boost::none;
49 utility::string_t avatarUrl = {};
50 utility::string_t bigAvatarUrl = {};
51 uint64_t contactCount = 0;
52 boost::optional<uint64_t> maxContact = boost::none;
53 std::vector<utility::string_t> tags = {};
54 utility::string_t isSeeder = {};
56 boost::optional<bool>
isBot = boost::none;
58 boost::optional<std::string>
publicKey = boost::none;
60 boost::optional<utility::string_t>
country = boost::none;
62 boost::optional<utility::string_t>
language = boost::none;
64 boost::optional<utility::string_t>
name = boost::none;
66 std::shared_ptr<Node>
node =
nullptr;
70 boost::optional<std::string>
nodeKey = boost::none;
72 std::unique_ptr<RsaKey>
rsaKeys =
nullptr;
74 boost::optional<std::string>
salt = boost::none;
76 boost::optional<utility::string_t>
email = boost::none;
78 boost::optional<utility::string_t>
nextEmail = boost::none;
90 std::unique_ptr<Offer>
offer =
nullptr;
96 template <
class Manager>
97 void visit(
const Manager& m) {
99 GIGA_MANAGE(m, login);
102 GIGA_MANAGE(m, activity);
103 GIGA_MANAGE(m, isUnlimited);
104 GIGA_MANAGE(m, gender);
106 GIGA_MANAGE(m, description);
107 GIGA_MANAGE(m, avatarUrl);
108 GIGA_MANAGE(m, bigAvatarUrl);
109 GIGA_MANAGE(m, contactCount);
110 GIGA_MANAGE(m, maxContact);
111 GIGA_MANAGE(m, tags);
112 GIGA_MANAGE(m, isSeeder);
113 GIGA_MANAGE(m,
isBot);
117 GIGA_MANAGE(m,
name);
118 GIGA_MANAGE(m,
node);
122 GIGA_MANAGE(m,
salt);
123 GIGA_MANAGE(m,
email);
130 GIGA_MANAGE(m,
offer);
boost::optional< uint64_t > starCount
Definition: User.h:94
boost::optional< uint64_t > achievements
Definition: User.h:84
boost::optional< utility::string_t > language
Definition: User.h:62
std::shared_ptr< Node > node
Definition: User.h:66
boost::optional< uint64_t > dlAvailable
Definition: User.h:92
boost::optional< uint64_t > downloaded
Definition: User.h:88
std::vector< std::unique_ptr< ExternalAccount > > externalAccounts
Definition: User.h:86
boost::optional< utility::string_t > email
Definition: User.h:76
std::unique_ptr< RsaKey > rsaKeys
Definition: User.h:72
boost::optional< std::string > salt
Definition: User.h:74
boost::optional< uint64_t > standatdMaxStorage
Definition: User.h:82
boost::optional< std::string > nodeKey
Definition: User.h:70
boost::optional< bool > isBot
Definition: User.h:56
boost::optional< utility::string_t > country
Definition: User.h:60
boost::optional< uint64_t > lastConnectionDate
Definition: User.h:42
boost::optional< std::string > publicKey
Definition: User.h:58
std::unique_ptr< Offer > offer
Definition: User.h:90
boost::optional< utility::string_t > reportedState
Definition: User.h:68
boost::optional< utility::string_t > nextEmail
Definition: User.h:78
boost::optional< utility::string_t > birthDate
Definition: User.h:47
uint64_t creationDate
Definition: User.h:40
boost::optional< uint64_t > maxStorage
Definition: User.h:80
boost::optional< utility::string_t > name
Definition: User.h:64