littleshop/DTOs/CryptoPaymentDto.cs
2025-08-20 13:20:19 +01:00

30 lines
991 B
C#

using LittleShop.Enums;
namespace LittleShop.DTOs;
public class CryptoPaymentDto
{
public Guid Id { get; set; }
public Guid OrderId { get; set; }
public CryptoCurrency Currency { get; set; }
public string WalletAddress { get; set; } = string.Empty;
public decimal RequiredAmount { get; set; }
public decimal PaidAmount { get; set; }
public PaymentStatus Status { get; set; }
public string? BTCPayInvoiceId { get; set; }
public string? TransactionHash { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
}
public class PaymentStatusDto
{
public Guid PaymentId { get; set; }
public PaymentStatus Status { get; set; }
public decimal RequiredAmount { get; set; }
public decimal PaidAmount { get; set; }
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
public bool IsExpired => DateTime.UtcNow > ExpiresAt;
}