btcpayserver/BTCPayServer/Models/WalletViewModels/PayoutsModel.cs

39 lines
1.3 KiB
C#
Raw Normal View History

2020-06-29 04:44:35 +02:00
using System;
2020-06-24 03:34:09 +02:00
using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Client.Models;
using BTCPayServer.Payments;
2020-06-24 03:34:09 +02:00
namespace BTCPayServer.Models.WalletViewModels
{
public class PayoutsModel : BasePagingViewModel
2020-06-24 03:34:09 +02:00
{
public string PullPaymentId { get; set; }
public string Command { get; set; }
public Dictionary<PayoutState, int> PayoutStateCount { get; set; }
public PaymentMethodId PaymentMethodId { get; set; }
public List<PayoutModel> Payouts { get; set; }
public PayoutState PayoutState { get; set; }
public string PullPaymentName { get; set; }
2020-06-24 03:34:09 +02:00
public class PayoutModel
{
public string PayoutId { get; set; }
public bool Selected { get; set; }
public DateTimeOffset Date { get; set; }
public string PullPaymentId { get; set; }
public string PullPaymentName { get; set; }
public string Destination { get; set; }
public string Amount { get; set; }
public string ProofLink { get; set; }
2020-06-24 03:34:09 +02:00
}
public string[] GetSelectedPayouts(PayoutState state)
{
return Payouts.Where(model => model.Selected).Select(model => model.PayoutId)
.ToArray();
}
2020-06-24 03:34:09 +02:00
}
}