2020-10-03 14:12:55 +02:00
|
|
|
using System;
|
2017-09-16 01:15:17 +09:00
|
|
|
using System.Collections.Generic;
|
2024-06-26 10:39:22 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2024-02-23 09:51:41 +01:00
|
|
|
using BTCPayServer.Data;
|
2023-05-26 16:49:32 +02:00
|
|
|
using BTCPayServer.Services.Stores;
|
2024-06-26 10:39:22 +02:00
|
|
|
using Microsoft.AspNetCore.Http;
|
2017-09-16 01:15:17 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Models.ServerViewModels
|
|
|
|
{
|
2021-12-31 16:59:02 +09:00
|
|
|
public class UsersViewModel : BasePagingViewModel
|
2017-09-16 01:15:17 +09:00
|
|
|
{
|
2017-10-27 17:53:04 +09:00
|
|
|
public class UserViewModel
|
|
|
|
{
|
2017-12-04 14:39:02 +09:00
|
|
|
public string Id { get; set; }
|
2019-07-19 02:50:17 -05:00
|
|
|
public string Email { get; set; }
|
2024-06-26 10:39:22 +02:00
|
|
|
public string Name { get; set; }
|
2024-09-12 05:31:57 +02:00
|
|
|
[Display(Name = "Invitation URL")]
|
|
|
|
public string InvitationUrl { get; set; }
|
2024-06-26 10:39:22 +02:00
|
|
|
[Display(Name = "Image")]
|
|
|
|
public IFormFile ImageFile { get; set; }
|
|
|
|
public string ImageUrl { get; set; }
|
2024-01-31 06:45:54 +01:00
|
|
|
public bool? EmailConfirmed { get; set; }
|
|
|
|
public bool? Approved { get; set; }
|
2022-04-26 14:27:35 +02:00
|
|
|
public bool Disabled { get; set; }
|
2020-10-03 14:12:55 +02:00
|
|
|
public bool IsAdmin { get; set; }
|
|
|
|
public DateTimeOffset? Created { get; set; }
|
2021-11-15 10:27:19 +01:00
|
|
|
public IEnumerable<string> Roles { get; set; }
|
2024-02-23 09:51:41 +01:00
|
|
|
public IEnumerable<UserStore> Stores { get; set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
}
|
2024-06-26 10:39:22 +02:00
|
|
|
public List<UserViewModel> Users { get; set; } = [];
|
2022-05-02 16:35:28 +09:00
|
|
|
public override int CurrentPageCount => Users.Count;
|
2021-11-15 10:27:19 +01:00
|
|
|
public Dictionary<string, string> Roles { get; set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
}
|
2023-05-26 16:49:32 +02:00
|
|
|
public class RolesViewModel : BasePagingViewModel
|
|
|
|
{
|
2024-06-26 10:39:22 +02:00
|
|
|
public List<StoreRepository.StoreRole> Roles { get; set; } = [];
|
2023-05-26 16:49:32 +02:00
|
|
|
public string DefaultRole { get; set; }
|
|
|
|
public override int CurrentPageCount => Roles.Count;
|
|
|
|
}
|
2017-09-16 01:15:17 +09:00
|
|
|
|
|
|
|
}
|