2024-05-02 15:00:09 +02:00
using System ;
2024-02-20 11:47:03 +01:00
using System.Collections.Generic ;
2024-05-06 16:13:57 +02:00
using BTCPayServer.Lightning ;
2024-02-20 11:47:03 +01:00
2024-04-09 20:45:21 +02:00
namespace BTCPayApp.CommonServer ;
2024-02-20 11:47:03 +01:00
2024-05-06 16:13:57 +02:00
public partial class LightningPayment
{
public string PaymentHash { get ; set ; }
public string? PaymentId { get ; set ; }
public string? Preimage { get ; set ; }
public string? Secret { get ; set ; }
public bool Inbound { get ; set ; }
public DateTimeOffset Timestamp { get ; set ; }
public long Value { get ; set ; }
public LightningPaymentStatus Status { get ; set ; }
2024-05-08 12:16:25 +02:00
//you can have multiple requests generated for the same payment hash, but once you reveal the preimage, you should reject any attempt to pay the same payment hash
public List < string > PaymentRequests { get ; set ; }
2024-05-06 16:13:57 +02:00
}
2024-04-09 20:45:21 +02:00
public class AppUserInfo
2024-02-20 11:47:03 +01:00
{
2024-04-15 22:24:07 +02:00
public string? UserId { get ; set ; }
public string? Email { get ; set ; }
public IEnumerable < string > ? Roles { get ; set ; }
public IEnumerable < AppUserStoreInfo > ? Stores { get ; set ; }
2024-05-02 15:00:09 +02:00
public static bool Equals ( AppUserInfo ? x , AppUserInfo ? y )
{
if ( ReferenceEquals ( x , y ) ) return true ;
if ( ReferenceEquals ( x , null ) ) return false ;
if ( ReferenceEquals ( y , null ) ) return false ;
if ( x . GetType ( ) ! = y . GetType ( ) ) return false ;
return x . UserId = = y . UserId & & x . Email = = y . Email & & Equals ( x . Roles , y . Roles ) & & Equals ( x . Stores , y . Stores ) ;
}
2024-02-20 11:47:03 +01:00
}
public class AppUserStoreInfo
{
2024-04-15 22:24:07 +02:00
public string? Id { get ; set ; }
public string? Name { get ; set ; }
public string? RoleId { get ; set ; }
2024-02-20 11:47:03 +01:00
public bool Archived { get ; set ; }
2024-04-15 22:24:07 +02:00
public IEnumerable < string > ? Permissions { get ; set ; }
2024-02-20 11:47:03 +01:00
}