2017-09-13 23:50:36 +09:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2022-01-20 12:52:31 +01:00
|
|
|
using BTCPayServer.Client.Models;
|
2020-06-28 17:55:27 +09:00
|
|
|
using BTCPayServer.Validation;
|
2022-10-17 12:16:29 +02:00
|
|
|
using Microsoft.AspNetCore.Http;
|
2017-09-13 23:50:36 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Models.StoreViewModels
|
|
|
|
{
|
2021-10-29 08:25:43 +02:00
|
|
|
public class GeneralSettingsViewModel
|
2017-09-13 23:50:36 +09:00
|
|
|
{
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2020-10-23 17:15:07 +02:00
|
|
|
[Display(Name = "Store ID")]
|
2017-12-03 23:35:52 +09:00
|
|
|
public string Id { get; set; }
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2017-10-27 17:53:04 +09:00
|
|
|
[Display(Name = "Store Name")]
|
|
|
|
[Required]
|
|
|
|
[MaxLength(50)]
|
|
|
|
[MinLength(1)]
|
2021-10-25 08:18:02 +02:00
|
|
|
public string StoreName { get; set; }
|
2017-09-13 23:50:36 +09:00
|
|
|
|
2018-05-14 09:32:04 +02:00
|
|
|
[Uri]
|
2017-10-27 17:53:04 +09:00
|
|
|
[Display(Name = "Store Website")]
|
|
|
|
[MaxLength(500)]
|
2021-10-25 08:18:02 +02:00
|
|
|
public string StoreWebsite { get; set; }
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2022-12-19 15:51:05 +01:00
|
|
|
[Display(Name = "Brand Color")]
|
|
|
|
public string BrandColor { get; set; }
|
|
|
|
|
2022-10-17 12:16:29 +02:00
|
|
|
[Display(Name = "Logo")]
|
|
|
|
public IFormFile LogoFile { get; set; }
|
|
|
|
public string LogoFileId { get; set; }
|
|
|
|
|
2022-12-19 15:51:05 +01:00
|
|
|
[Display(Name = "Custom CSS")]
|
|
|
|
public IFormFile CssFile { get; set; }
|
|
|
|
public string CssFileId { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2021-10-29 08:25:43 +02:00
|
|
|
public bool CanDelete { get; set; }
|
2022-01-20 12:52:31 +01:00
|
|
|
|
|
|
|
[Display(Name = "Allow anyone to create invoice")]
|
|
|
|
public bool AnyoneCanCreateInvoice { get; set; }
|
|
|
|
|
|
|
|
[Display(Name = "Invoice expires if the full amount has not been paid after …")]
|
|
|
|
[Range(1, 60 * 24 * 24)]
|
|
|
|
public int InvoiceExpiration { get; set; }
|
|
|
|
|
|
|
|
[Display(Name = "Add additional fee (network fee) to invoice …")]
|
|
|
|
public NetworkFeeMode NetworkFeeMode { get; set; }
|
|
|
|
|
|
|
|
[Display(Name = "Consider the invoice paid even if the paid amount is ... % less than expected")]
|
|
|
|
[Range(0, 100)]
|
|
|
|
public double PaymentTolerance { get; set; }
|
|
|
|
|
|
|
|
[Display(Name = "Default currency")]
|
|
|
|
[MaxLength(10)]
|
|
|
|
public string DefaultCurrency { get; set; }
|
|
|
|
|
|
|
|
[Display(Name = "Minimum acceptable expiration time for BOLT11 for refunds")]
|
|
|
|
[Range(1, 365 * 10)]
|
|
|
|
public long BOLT11Expiration { get; set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
}
|
2017-09-13 23:50:36 +09:00
|
|
|
}
|