Dons PayPal

This commit is contained in:
Paul Schneider 2026-11-02 10:40:29 +00:00
commit e3b4414ab1
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
45 changed files with 7476 additions and 9 deletions

View 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);

View file

@ -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);