mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
* Greenfield: Refactor app endpoints - Do not change unset data - Clean up difference between request (template) and data (items/perks) - Add missing properties (form id and custom tip percentage) - Update docs * Revert ToSettings changes in GreenfieldAppsController
55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
#nullable enable
|
|
using System;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
namespace BTCPayServer.Client.Models;
|
|
|
|
public abstract class CrowdfundBaseData : AppBaseData
|
|
{
|
|
public string? Title { get; set; }
|
|
public bool? Enabled { get; set; }
|
|
public bool? EnforceTargetAmount { get; set; }
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
|
public DateTimeOffset? StartDate { get; set; }
|
|
public string? TargetCurrency { get; set; }
|
|
public string? Description { get; set; }
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
|
public DateTimeOffset? EndDate { get; set; }
|
|
public decimal? TargetAmount { get; set; }
|
|
public string? MainImageUrl { get; set; }
|
|
public string? NotificationUrl { get; set; }
|
|
public string? Tagline { get; set; }
|
|
public bool? DisqusEnabled { get; set; }
|
|
public string? DisqusShortname { get; set; }
|
|
public bool? SoundsEnabled { get; set; }
|
|
public bool? AnimationsEnabled { get; set; }
|
|
public int? ResetEveryAmount { get; set; }
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public CrowdfundResetEvery? ResetEvery { get; set; }
|
|
public bool? DisplayPerksValue { get; set; }
|
|
public bool? DisplayPerksRanking { get; set; }
|
|
public bool? SortPerksByPopularity { get; set; }
|
|
public string[]? Sounds { get; set; }
|
|
public string[]? AnimationColors { get; set; }
|
|
public string? FormId { get; set; }
|
|
}
|
|
|
|
public class CrowdfundAppData : CrowdfundBaseData
|
|
{
|
|
public object? Perks { get; set; }
|
|
}
|
|
|
|
public class CrowdfundAppRequest : CrowdfundBaseData, IAppRequest
|
|
{
|
|
public string? PerksTemplate { get; set; }
|
|
}
|
|
|
|
public enum CrowdfundResetEvery
|
|
{
|
|
Never,
|
|
Hour,
|
|
Day,
|
|
Month,
|
|
Year
|
|
}
|