btcpayserver/BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs
d11n 4c303d358b
Branding updates for 2.0 (#5947)
* Remove deprecated CSS options

Closes #5945.

* Greenfield: Add brandColor to store APIs

Closes #5946.

* Migrate file IDs to URLs

Closes #5953.

* Greenfield: Add CSS and logo URL to store settings API

Closes #5945.

* Add migration test

* Store and Server branding can reference file's via fileid:ID

* Add PaymentSoundUrl to Store API

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2024-05-09 09:18:02 +09:00

60 lines
1.9 KiB
C#

using System.ComponentModel.DataAnnotations;
using BTCPayServer.Client.Models;
using BTCPayServer.Validation;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Models.StoreViewModels
{
public class GeneralSettingsViewModel
{
[Display(Name = "Store ID")]
public string Id { get; set; }
[Display(Name = "Store Name")]
[Required]
[MaxLength(50)]
[MinLength(1)]
public string StoreName { get; set; }
[Uri]
[Display(Name = "Store Website")]
[MaxLength(500)]
public string StoreWebsite { get; set; }
[Display(Name = "Brand Color")]
public string BrandColor { get; set; }
[Display(Name = "Logo")]
public IFormFile LogoFile { get; set; }
public string LogoUrl { get; set; }
[Display(Name = "Custom CSS")]
public IFormFile CssFile { get; set; }
public string CssUrl { get; set; }
public bool Archived { get; set; }
[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(0, 365 * 10)]
public long BOLT11Expiration { get; set; }
}
}