2018-12-11 16:36:25 +01:00
|
|
|
|
using System;
|
2019-01-04 11:42:37 +01:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2018-12-11 16:36:25 +01:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace BTCPayServer.Models.AppViewModels
|
|
|
|
|
{
|
|
|
|
|
public class UpdateCrowdfundViewModel
|
|
|
|
|
{
|
2019-01-04 11:42:37 +01:00
|
|
|
|
[Required] [MaxLength(30)] public string Title { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(50)] public string Tagline { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required] public string Description { get; set; }
|
2019-01-04 12:58:29 +01:00
|
|
|
|
|
|
|
|
|
[Display(Name = "Featured Image")]
|
2018-12-22 15:02:16 +01:00
|
|
|
|
public string MainImageUrl { get; set; }
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
2018-12-22 15:02:16 +01:00
|
|
|
|
public string NotificationUrl { get; set; }
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
2018-12-11 16:36:25 +01:00
|
|
|
|
[Required]
|
2019-01-10 14:19:06 +01:00
|
|
|
|
[Display(Name = "Allow crowdfund to be publicly visible (still visible to you)")]
|
2018-12-28 17:38:20 +01:00
|
|
|
|
public bool Enabled { get; set; } = false;
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
2018-12-31 11:38:05 +01:00
|
|
|
|
[Required]
|
|
|
|
|
[Display(Name = "Enable background animations on new payments")]
|
|
|
|
|
public bool AnimationsEnabled { get; set; } = true;
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
2018-12-31 11:38:05 +01:00
|
|
|
|
[Required]
|
|
|
|
|
[Display(Name = "Enable sounds on new payments")]
|
|
|
|
|
public bool SoundsEnabled { get; set; } = true;
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
2018-12-31 11:38:05 +01:00
|
|
|
|
[Required]
|
|
|
|
|
[Display(Name = "Enable Disqus Comments")]
|
|
|
|
|
public bool DisqusEnabled { get; set; } = true;
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
|
|
|
|
[Display(Name = "Disqus Shortname")] public string DisqusShortname { get; set; }
|
|
|
|
|
|
2018-12-11 16:36:25 +01:00
|
|
|
|
public DateTime? StartDate { get; set; }
|
|
|
|
|
public DateTime? EndDate { get; set; }
|
2018-12-31 11:38:05 +01:00
|
|
|
|
|
2018-12-11 16:36:25 +01:00
|
|
|
|
[Required]
|
|
|
|
|
[MaxLength(5)]
|
2019-01-04 12:58:29 +01:00
|
|
|
|
[Display(Name = "The primary currency used for targets and stats. (e.g. BTC, LTC, USD, etc.)")]
|
2018-12-31 11:38:05 +01:00
|
|
|
|
public string TargetCurrency { get; set; } = "BTC";
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
2018-12-11 16:36:25 +01:00
|
|
|
|
[Display(Name = "Set a Target amount ")]
|
|
|
|
|
public decimal? TargetAmount { get; set; }
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<string> ResetEveryValues = Enum.GetNames(typeof(CrowdfundResetEvery));
|
|
|
|
|
|
|
|
|
|
[Display(Name = "Reset goal every")] public string ResetEvery { get; set; } = nameof(CrowdfundResetEvery.Never);
|
|
|
|
|
|
|
|
|
|
public int ResetEveryAmount { get; set; } = 1;
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 16:36:25 +01:00
|
|
|
|
[Display(Name = "Do not allow additional contributions after target has been reached")]
|
|
|
|
|
public bool EnforceTargetAmount { get; set; }
|
|
|
|
|
|
2018-12-29 11:52:07 +01:00
|
|
|
|
[Display(Name = "Contribution Perks Template")]
|
|
|
|
|
public string PerksTemplate { get; set; }
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
2018-12-11 16:36:25 +01:00
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
[Display(Name = "Custom bootstrap CSS file")]
|
|
|
|
|
public string CustomCSSLink { get; set; }
|
2018-12-22 15:02:16 +01:00
|
|
|
|
|
2019-01-04 12:58:29 +01:00
|
|
|
|
[Display(Name = "Custom CSS Code")]
|
2018-12-22 15:43:40 +01:00
|
|
|
|
public string EmbeddedCSS { get; set; }
|
2019-01-02 12:47:06 +01:00
|
|
|
|
|
|
|
|
|
[Display(Name = "Base the contributed goal amount on the invoice amount and not actual payments")]
|
2019-01-06 14:28:53 +01:00
|
|
|
|
public bool UseInvoiceAmount { get; set; }
|
2019-01-04 12:58:29 +01:00
|
|
|
|
[Display(Name = "Count all invoices created on the store as part of the crowdfunding goal")]
|
2019-01-06 14:28:53 +01:00
|
|
|
|
public bool UseAllStoreInvoices { get; set; }
|
2019-01-05 10:17:52 +01:00
|
|
|
|
|
|
|
|
|
public string AppId { get; set; }
|
2019-01-09 12:22:36 +01:00
|
|
|
|
[Display(Name = "Sort contribution perks by popularity")]
|
|
|
|
|
public bool SortPerksByPopularity { get; set; }
|
|
|
|
|
[Display(Name = "Display contribution ranking")]
|
|
|
|
|
public bool DisplayPerksRanking { get; set; }
|
2018-12-11 16:36:25 +01:00
|
|
|
|
}
|
2019-01-04 11:42:37 +01:00
|
|
|
|
|
|
|
|
|
public enum CrowdfundResetEvery
|
|
|
|
|
{
|
|
|
|
|
Never,
|
|
|
|
|
Hour,
|
|
|
|
|
Day,
|
|
|
|
|
Month,
|
|
|
|
|
Year
|
|
|
|
|
}
|
2018-12-11 16:36:25 +01:00
|
|
|
|
}
|