2020-06-29 04:44:35 +02:00
|
|
|
using System;
|
2020-06-24 03:34:09 +02:00
|
|
|
using System.Collections.Generic;
|
2021-04-13 10:36:49 +02:00
|
|
|
using System.Linq;
|
|
|
|
using BTCPayServer.Client.Models;
|
|
|
|
using BTCPayServer.Payments;
|
2020-06-24 03:34:09 +02:00
|
|
|
|
|
|
|
namespace BTCPayServer.Models.WalletViewModels
|
|
|
|
{
|
2021-06-30 09:59:01 +02:00
|
|
|
public class PayoutsModel : BasePagingViewModel
|
2020-06-24 03:34:09 +02:00
|
|
|
{
|
|
|
|
public string PullPaymentId { get; set; }
|
|
|
|
public string Command { get; set; }
|
2021-06-30 09:59:01 +02:00
|
|
|
public Dictionary<PayoutState, int> PayoutStateCount { get; set; }
|
2021-04-13 10:36:49 +02:00
|
|
|
public PaymentMethodId PaymentMethodId { get; set; }
|
|
|
|
|
2021-06-30 09:59:01 +02:00
|
|
|
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; }
|
2021-06-10 11:43:45 +02:00
|
|
|
public string ProofLink { get; set; }
|
2020-06-24 03:34:09 +02:00
|
|
|
}
|
2021-04-13 10:36:49 +02:00
|
|
|
|
|
|
|
public string[] GetSelectedPayouts(PayoutState state)
|
|
|
|
{
|
2021-06-30 09:59:01 +02:00
|
|
|
return Payouts.Where(model => model.Selected).Select(model => model.PayoutId)
|
2021-04-13 10:36:49 +02:00
|
|
|
.ToArray();
|
|
|
|
}
|
2020-06-24 03:34:09 +02:00
|
|
|
}
|
|
|
|
}
|