data_credits_earn.h 788 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "core/stars_amount.h"
  9. #include "data/data_statistics_chart.h"
  10. #include <QtCore/QDateTime>
  11. namespace Data {
  12. struct CreditsEarnStatistics final {
  13. explicit operator bool() const {
  14. return usdRate
  15. && currentBalance
  16. && availableBalance
  17. && overallRevenue;
  18. }
  19. Data::StatisticalGraph revenueGraph;
  20. StarsAmount currentBalance;
  21. StarsAmount availableBalance;
  22. StarsAmount overallRevenue;
  23. float64 usdRate = 0.;
  24. bool isWithdrawalEnabled = false;
  25. QDateTime nextWithdrawalAt;
  26. QString buyAdsUrl;
  27. };
  28. } // namespace Data