2023-10-11 21:09:36 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Data {
|
|
|
|
|
|
|
|
struct BoostsOverview final {
|
2024-02-02 17:30:53 +00:00
|
|
|
bool group = false;
|
2023-11-07 13:58:20 +00:00
|
|
|
int mine = 0;
|
2023-10-11 21:09:36 +00:00
|
|
|
int level = 0;
|
|
|
|
int boostCount = 0;
|
|
|
|
int currentLevelBoostCount = 0;
|
|
|
|
int nextLevelBoostCount = 0;
|
|
|
|
int premiumMemberCount = 0;
|
|
|
|
float64 premiumMemberPercentage = 0;
|
|
|
|
};
|
|
|
|
|
2023-10-24 10:07:06 +00:00
|
|
|
struct GiftCodeLink final {
|
|
|
|
QString text;
|
|
|
|
QString link;
|
|
|
|
QString slug;
|
|
|
|
};
|
|
|
|
|
2023-10-11 21:09:36 +00:00
|
|
|
struct Boost final {
|
2023-10-24 10:07:06 +00:00
|
|
|
bool isGift = false;
|
|
|
|
bool isGiveaway = false;
|
|
|
|
bool isUnclaimed = false;
|
|
|
|
|
|
|
|
QString id;
|
2023-10-11 21:09:36 +00:00
|
|
|
UserId userId = UserId(0);
|
2023-10-24 10:07:06 +00:00
|
|
|
FullMsgId giveawayMessage;
|
|
|
|
QDateTime date;
|
2023-11-08 20:54:52 +00:00
|
|
|
QDateTime expiresAt;
|
|
|
|
int expiresAfterMonths = 0;
|
2023-10-24 10:07:06 +00:00
|
|
|
GiftCodeLink giftCodeLink;
|
|
|
|
int multiplier = 0;
|
2023-10-11 21:09:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct BoostsListSlice final {
|
|
|
|
struct OffsetToken final {
|
|
|
|
QString next;
|
2023-11-02 12:28:17 +00:00
|
|
|
bool gifts = false;
|
2023-10-11 21:09:36 +00:00
|
|
|
};
|
|
|
|
std::vector<Boost> list;
|
2023-11-02 12:28:17 +00:00
|
|
|
int multipliedTotal = 0;
|
2023-10-11 21:09:36 +00:00
|
|
|
bool allLoaded = false;
|
|
|
|
OffsetToken token;
|
|
|
|
};
|
|
|
|
|
2023-11-08 11:54:45 +00:00
|
|
|
struct BoostPrepaidGiveaway final {
|
|
|
|
int months = 0;
|
|
|
|
uint64 id = 0;
|
|
|
|
int quantity = 0;
|
|
|
|
QDateTime date;
|
|
|
|
};
|
|
|
|
|
2023-10-11 21:09:36 +00:00
|
|
|
struct BoostStatus final {
|
|
|
|
BoostsOverview overview;
|
2023-11-02 12:28:17 +00:00
|
|
|
BoostsListSlice firstSliceBoosts;
|
|
|
|
BoostsListSlice firstSliceGifts;
|
2023-11-08 11:54:45 +00:00
|
|
|
std::vector<BoostPrepaidGiveaway> prepaidGiveaway;
|
2023-10-11 21:09:36 +00:00
|
|
|
QString link;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Data
|