2018-12-18 16:27:03 +01:00
|
|
|
|
using System;
|
2019-01-02 10:41:54 +01:00
|
|
|
|
using System.Collections.Generic;
|
2018-12-18 16:27:03 +01:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2019-01-02 10:41:54 +01:00
|
|
|
|
using System.Threading.Tasks;
|
2019-01-08 15:49:07 +01:00
|
|
|
|
using BTCPayServer.Services.Rates;
|
2018-12-18 16:27:03 +01:00
|
|
|
|
|
|
|
|
|
namespace BTCPayServer.Models.AppViewModels
|
2018-12-11 16:36:25 +01:00
|
|
|
|
{
|
|
|
|
|
public class ViewCrowdfundViewModel
|
|
|
|
|
{
|
2018-12-18 16:27:03 +01:00
|
|
|
|
public string StatusMessage{ get; set; }
|
|
|
|
|
public string StoreId { get; set; }
|
|
|
|
|
public string AppId { get; set; }
|
2018-12-11 16:36:25 +01:00
|
|
|
|
public string Title { get; set; }
|
2018-12-18 16:27:03 +01:00
|
|
|
|
public string Description { get; set; }
|
2018-12-22 15:02:16 +01:00
|
|
|
|
public string MainImageUrl { get; set; }
|
2018-12-22 15:43:40 +01:00
|
|
|
|
public string EmbeddedCSS { get; set; }
|
2018-12-11 16:36:25 +01:00
|
|
|
|
public string CustomCSSLink { get; set; }
|
2018-12-18 16:27:03 +01:00
|
|
|
|
public DateTime? StartDate { get; set; }
|
|
|
|
|
public DateTime? EndDate { get; set; }
|
|
|
|
|
|
|
|
|
|
public string TargetCurrency { get; set; }
|
|
|
|
|
public decimal? TargetAmount { get; set; }
|
|
|
|
|
public bool EnforceTargetAmount { get; set; }
|
|
|
|
|
|
|
|
|
|
public CrowdfundInfo Info { get; set; }
|
2018-12-22 15:02:16 +01:00
|
|
|
|
public string Tagline { get; set; }
|
2018-12-29 11:52:07 +01:00
|
|
|
|
public ViewPointOfSaleViewModel.Item[] Perks { get; set; }
|
2018-12-31 11:38:05 +01:00
|
|
|
|
public bool DisqusEnabled { get; set; }
|
|
|
|
|
public bool SoundsEnabled { get; set; }
|
|
|
|
|
public string DisqusShortname { get; set; }
|
|
|
|
|
public bool AnimationsEnabled { get; set; }
|
2019-01-04 11:42:37 +01:00
|
|
|
|
public int ResetEveryAmount { get; set; }
|
2019-02-19 13:18:30 +09:00
|
|
|
|
public bool NeverReset { get; set; }
|
2018-12-18 16:27:03 +01:00
|
|
|
|
|
2019-01-08 15:10:05 +01:00
|
|
|
|
public Dictionary<string, int> PerkCount { get; set; }
|
2019-01-08 15:49:07 +01:00
|
|
|
|
|
|
|
|
|
public CurrencyData CurrencyData { get; set; }
|
2019-01-08 15:10:05 +01:00
|
|
|
|
|
2018-12-18 16:27:03 +01:00
|
|
|
|
public class CrowdfundInfo
|
|
|
|
|
{
|
|
|
|
|
public int TotalContributors { get; set; }
|
2019-01-02 10:41:54 +01:00
|
|
|
|
public decimal CurrentPendingAmount { get; set; }
|
2018-12-18 16:27:03 +01:00
|
|
|
|
public decimal CurrentAmount { get; set; }
|
2018-12-22 15:02:16 +01:00
|
|
|
|
public decimal? ProgressPercentage { get; set; }
|
2018-12-28 17:38:20 +01:00
|
|
|
|
public decimal? PendingProgressPercentage { get; set; }
|
2019-01-02 09:45:04 +01:00
|
|
|
|
public DateTime LastUpdated { get; set; }
|
2019-01-02 10:41:54 +01:00
|
|
|
|
public Dictionary<string, decimal> PaymentStats { get; set; }
|
|
|
|
|
public Dictionary<string, decimal> PendingPaymentStats { get; set; }
|
2019-01-04 11:42:37 +01:00
|
|
|
|
public DateTime? LastResetDate { get; set; }
|
|
|
|
|
public DateTime? NextResetDate { get; set; }
|
2018-12-18 16:27:03 +01:00
|
|
|
|
}
|
2019-01-07 14:39:04 +01:00
|
|
|
|
|
|
|
|
|
public bool Started => !StartDate.HasValue || DateTime.Now.ToUniversalTime() > StartDate;
|
|
|
|
|
|
|
|
|
|
public bool Ended => !EndDate.HasValue || DateTime.Now.ToUniversalTime() > EndDate;
|
2019-01-09 12:22:36 +01:00
|
|
|
|
public bool DisplayPerksRanking { get; set; }
|
2019-03-03 17:06:11 -06:00
|
|
|
|
public bool Enabled { get; set; }
|
2018-12-18 16:27:03 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ContributeToCrowdfund
|
|
|
|
|
{
|
2018-12-22 15:02:16 +01:00
|
|
|
|
public ViewCrowdfundViewModel ViewCrowdfundViewModel { get; set; }
|
2018-12-18 16:27:03 +01:00
|
|
|
|
[Required] public decimal Amount { get; set; }
|
|
|
|
|
public string Email { get; set; }
|
2018-12-29 11:52:07 +01:00
|
|
|
|
public string ChoiceKey { get; set; }
|
|
|
|
|
public bool RedirectToCheckout { get; set; }
|
|
|
|
|
public string RedirectUrl { get; set; }
|
2018-12-11 16:36:25 +01:00
|
|
|
|
}
|
|
|
|
|
}
|