btcpayserver/BTCPayServer/Models/ServerViewModels/UsersViewModel.cs

42 lines
1.5 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.Data;
2023-05-26 16:49:32 +02:00
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Models.ServerViewModels
{
2021-12-31 16:59:02 +09:00
public class UsersViewModel : BasePagingViewModel
{
public class UserViewModel
{
2017-12-04 14:39:02 +09:00
public string Id { get; set; }
public string Email { get; set; }
public string Name { get; set; }
[Display(Name = "Invitation URL")]
public string InvitationUrl { get; set; }
[Display(Name = "Image")]
public IFormFile ImageFile { get; set; }
public string ImageUrl { get; set; }
public bool? EmailConfirmed { get; set; }
public bool? Approved { get; set; }
public bool Disabled { get; set; }
public bool IsAdmin { get; set; }
public DateTimeOffset? Created { get; set; }
2021-11-15 10:27:19 +01:00
public IEnumerable<string> Roles { get; set; }
public IEnumerable<UserStore> Stores { get; set; }
}
public List<UserViewModel> Users { get; set; } = [];
public override int CurrentPageCount => Users.Count;
2021-11-15 10:27:19 +01:00
public Dictionary<string, string> Roles { get; set; }
}
2023-05-26 16:49:32 +02:00
public class RolesViewModel : BasePagingViewModel
{
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;
}
}