Dons PayPal
This commit is contained in:
parent
20a44bfde1
commit
e3b4414ab1
45 changed files with 7476 additions and 9 deletions
26
src/Yavsc.Org/ViewModels/Podcast/DonationViewModels.cs
Normal file
26
src/Yavsc.Org/ViewModels/Podcast/DonationViewModels.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#nullable enable
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
using Yavsc.Models.Payment;
|
||||
|
||||
namespace Yavsc.ViewModels.Podcast;
|
||||
|
||||
public sealed class CreateDonationViewModel
|
||||
{
|
||||
[Required]
|
||||
public string PerformerId { get; set; } = "";
|
||||
[BindNever]
|
||||
public string PerformerName { get; set; } = "";
|
||||
[Range(typeof(decimal), "0.01", "9999999999999999.99",
|
||||
ParseLimitsInInvariantCulture = true, ConvertValueInInvariantCulture = true)]
|
||||
public decimal Amount { get; set; } = 5m;
|
||||
}
|
||||
|
||||
public sealed class DonationSettingsViewModel
|
||||
{
|
||||
[EmailAddress, StringLength(127)]
|
||||
public string? PayPalEmail { get; set; }
|
||||
}
|
||||
|
||||
public sealed record DonationDetailsViewModel(PerformerDonation Donation, string PerformerName);
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#nullable enable
|
||||
|
||||
using Yavsc.Abstract.Streaming;
|
||||
|
||||
namespace Yavsc.ViewModels.Podcast;
|
||||
|
||||
public sealed record PodcastCatalogueViewModel(
|
||||
IReadOnlyList<PodcastResponse> Podcasts,
|
||||
IReadOnlySet<string> DonationPerformerIds,
|
||||
string? Error = null);
|
||||
Loading…
Reference in a new issue