2024-05-02 15:00:09 +02:00
|
|
|
using System;
|
2024-02-20 11:47:03 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2024-04-09 20:45:21 +02:00
|
|
|
namespace BTCPayApp.CommonServer;
|
2024-02-20 11:47:03 +01: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
|
|
|
}
|