我滴个乖乖
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public partial class AccountProfileAccountViewModel
|
||||
{
|
||||
[Display(Name = "主题")]
|
||||
public string? Theme { get; set; } = string.Empty;
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
[Display(Name = "Email")]
|
||||
[Required(ErrorMessage = "邮箱地址为必填项")]
|
||||
public string EmailAddress { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "账号")]
|
||||
[Required(ErrorMessage = "账号为必填项")]
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
|
||||
public string? Navigation { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "姓")]
|
||||
public string? LastName { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "名")]
|
||||
public string? FirstName { get; set; }
|
||||
|
||||
[Display(Name = "时区")]
|
||||
[Required(ErrorMessage = "时区为必填项")]
|
||||
public string TimeZone { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "国家")]
|
||||
[Required(ErrorMessage = "国家为必填项")]
|
||||
public string Country { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "语言")]
|
||||
[Required(ErrorMessage = "语言为必填项")]
|
||||
public string Language { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "个人简介")]
|
||||
public string? Biography { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "邮箱确认?")]
|
||||
public bool EmailConfirmed { get; set; }
|
||||
|
||||
public byte[]? Avatar { get; set; }
|
||||
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
|
||||
public int PaginationPageSize { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
|
||||
public string Role { get; set; } = string.Empty;
|
||||
|
||||
public static AccountProfileAccountViewModel FromDataModel(AccountProfile model)
|
||||
{
|
||||
return new AccountProfileAccountViewModel
|
||||
{
|
||||
Theme = model.Theme,
|
||||
UserId = model.UserId,
|
||||
EmailAddress = model.EmailAddress,
|
||||
AccountName = model.AccountName,
|
||||
Avatar = model.Avatar,
|
||||
Biography = model.Biography,
|
||||
Country = model.Country,
|
||||
Language = model.Language,
|
||||
CreatedDate = model.CreatedDate,
|
||||
EmailConfirmed = model.EmailConfirmed,
|
||||
FirstName = model.FirstName,
|
||||
LastName = model.LastName,
|
||||
ModifiedDate = model.ModifiedDate,
|
||||
Navigation = model.Navigation,
|
||||
PaginationPageCount = model.PaginationPageCount,
|
||||
Role = model.Role,
|
||||
PaginationPageSize = model.PaginationPageSize,
|
||||
TimeZone = model.TimeZone
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
17
ZelWiki.Models/ViewModels/Admin/AccountProfileViewModel.cs
Normal file
17
ZelWiki.Models/ViewModels/Admin/AccountProfileViewModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using ZelWiki.Library;
|
||||
using ZelWiki.Models.DataModels;
|
||||
using ZelWiki.Models.ViewModels.Shared;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class AccountProfileViewModel : ViewModelBase
|
||||
{
|
||||
public List<Theme> Themes { get; set; } = new();
|
||||
public List<TimeZoneItem> TimeZones { get; set; } = new();
|
||||
public List<CountryItem> Countries { get; set; } = new();
|
||||
public List<LanguageItem> Languages { get; set; } = new();
|
||||
public List<Role> Roles { get; set; } = new();
|
||||
public AccountProfileAccountViewModel AccountProfile { get; set; } = new();
|
||||
public CredentialViewModel Credential { get; set; } = new();
|
||||
}
|
||||
}
|
||||
11
ZelWiki.Models/ViewModels/Admin/AccountsViewModel.cs
Normal file
11
ZelWiki.Models/ViewModels/Admin/AccountsViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class AccountsViewModel : ViewModelBase
|
||||
{
|
||||
public List<AccountProfile> Users { get; set; } = new();
|
||||
public string SearchString { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
16
ZelWiki.Models/ViewModels/Admin/AddEmojiViewModel.cs
Normal file
16
ZelWiki.Models/ViewModels/Admin/AddEmojiViewModel.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class AddEmojiViewModel : ViewModelBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[Display(Name ="名称")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? OriginalName { get; set; }
|
||||
|
||||
[Display(Name = "分类")]
|
||||
public string Categories { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
15
ZelWiki.Models/ViewModels/Admin/ConfigurationViewModel.cs
Normal file
15
ZelWiki.Models/ViewModels/Admin/ConfigurationViewModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using ZelWiki.Library;
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class ConfigurationViewModel : ViewModelBase
|
||||
{
|
||||
public List<Theme> Themes { get; set; } = new();
|
||||
public List<Role> Roles { get; set; } = new();
|
||||
public List<TimeZoneItem> TimeZones { get; set; } = new();
|
||||
public List<CountryItem> Countries { get; set; } = new();
|
||||
public List<LanguageItem> Languages { get; set; } = new();
|
||||
public List<ConfigurationNest> Nest { get; set; } = new();
|
||||
}
|
||||
}
|
||||
9
ZelWiki.Models/ViewModels/Admin/DatabaseViewModel.cs
Normal file
9
ZelWiki.Models/ViewModels/Admin/DatabaseViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class DatabaseViewModel : ViewModelBase
|
||||
{
|
||||
public List<DatabaseInfo> Info { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace ZelWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class DeletedPageRevisionViewModel : ViewModelBase
|
||||
{
|
||||
public int PageId { get; set; }
|
||||
public int Revision { get; set; }
|
||||
public string Body { get; set; } = string.Empty;
|
||||
public string DeletedByUserName { get; set; } = string.Empty;
|
||||
public DateTime DeletedDate { get; set; }
|
||||
}
|
||||
}
|
||||
13
ZelWiki.Models/ViewModels/Admin/DeletedPageViewModel.cs
Normal file
13
ZelWiki.Models/ViewModels/Admin/DeletedPageViewModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class DeletedPageViewModel : ViewModelBase
|
||||
{
|
||||
public int PageId { get; set; }
|
||||
public string Body { get; set; } = string.Empty;
|
||||
public string DeletedByUserName { get; set; } = string.Empty;
|
||||
public DateTime DeletedDate { get; set; }
|
||||
public List<PageComment> Comments { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class DeletedPagesRevisionsViewModel : ViewModelBase
|
||||
{
|
||||
public int PageId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Namespace { get; set; } = string.Empty;
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public List<DeletedPageRevision> Revisions { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
ZelWiki.Models/ViewModels/Admin/DeletedPagesViewModel.cs
Normal file
9
ZelWiki.Models/ViewModels/Admin/DeletedPagesViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class DeletedPagesViewModel : ViewModelBase
|
||||
{
|
||||
public List<DataModels.Page> Pages { get; set; } = new();
|
||||
public string SearchString { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
13
ZelWiki.Models/ViewModels/Admin/EmojiViewModel.cs
Normal file
13
ZelWiki.Models/ViewModels/Admin/EmojiViewModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class EmojiViewModel : ViewModelBase
|
||||
{
|
||||
public Emoji Emoji { get; set; } = new();
|
||||
public string OriginalName { get; set; } = string.Empty;
|
||||
[Display(Name = "分类")]
|
||||
public string Categories { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
11
ZelWiki.Models/ViewModels/Admin/EmojisViewModel.cs
Normal file
11
ZelWiki.Models/ViewModels/Admin/EmojisViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class EmojisViewModel : ViewModelBase
|
||||
{
|
||||
public List<Emoji> Emojis { get; set; } = new();
|
||||
public string SearchString { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
ZelWiki.Models/ViewModels/Admin/ExceptionViewModel.cs
Normal file
9
ZelWiki.Models/ViewModels/Admin/ExceptionViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class ExceptionViewModel : ViewModelBase
|
||||
{
|
||||
public WikiException Exception { get; set; } = new();
|
||||
}
|
||||
}
|
||||
10
ZelWiki.Models/ViewModels/Admin/ExceptionsViewModel.cs
Normal file
10
ZelWiki.Models/ViewModels/Admin/ExceptionsViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class ExceptionsViewModel : ViewModelBase
|
||||
{
|
||||
public List<WikiException> Exceptions { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
27
ZelWiki.Models/ViewModels/Admin/MenuItemViewModel.cs
Normal file
27
ZelWiki.Models/ViewModels/Admin/MenuItemViewModel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MenuItemViewModel : ViewModelBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Display(Name = "分类")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[Display(Name = "链接")]
|
||||
public string Link { get; set; } = string.Empty;
|
||||
[Display(Name = "序列")]
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
public MenuItem ToDataModel()
|
||||
{
|
||||
return new MenuItem
|
||||
{
|
||||
Name = Name,
|
||||
Id = Id,
|
||||
Link = Link,
|
||||
Ordinal = Ordinal
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
9
ZelWiki.Models/ViewModels/Admin/MenuItemsViewModel.cs
Normal file
9
ZelWiki.Models/ViewModels/Admin/MenuItemsViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MenuItemsViewModel : ViewModelBase
|
||||
{
|
||||
public List<MenuItem> Items { get; set; } = new();
|
||||
}
|
||||
}
|
||||
10
ZelWiki.Models/ViewModels/Admin/MetricsViewModel.cs
Normal file
10
ZelWiki.Models/ViewModels/Admin/MetricsViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MetricsViewModel : ViewModelBase
|
||||
{
|
||||
public WikiDatabaseStatistics Metrics { get; set; } = new();
|
||||
public string ApplicationVersion { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
10
ZelWiki.Models/ViewModels/Admin/MissingPagesViewModel.cs
Normal file
10
ZelWiki.Models/ViewModels/Admin/MissingPagesViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MissingPagesViewModel : ViewModelBase
|
||||
{
|
||||
public List<NonexistentPage> Pages { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
ZelWiki.Models/ViewModels/Admin/NamespaceViewModel.cs
Normal file
9
ZelWiki.Models/ViewModels/Admin/NamespaceViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class NamespaceViewModel : ViewModelBase
|
||||
{
|
||||
public List<DataModels.Page> Pages { get; set; } = new();
|
||||
public string Namespace { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
10
ZelWiki.Models/ViewModels/Admin/NamespacesViewModel.cs
Normal file
10
ZelWiki.Models/ViewModels/Admin/NamespacesViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class NamespacesViewModel : ViewModelBase
|
||||
{
|
||||
public List<NamespaceStat> Namespaces { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class OrphanedPageAttachmentsViewModel : ViewModelBase
|
||||
{
|
||||
public List<DataModels.OrphanedPageAttachment> Files { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class PageCompilationStatisticsViewModel : ViewModelBase
|
||||
{
|
||||
public List<PageCompilationStatistics> Statistics { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
10
ZelWiki.Models/ViewModels/Admin/PageModerateViewModel.cs
Normal file
10
ZelWiki.Models/ViewModels/Admin/PageModerateViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class PageModerateViewModel : ViewModelBase
|
||||
{
|
||||
public List<string> Instructions { get; set; } = new();
|
||||
public List<DataModels.Page> Pages { get; set; } = new();
|
||||
public string Instruction { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
11
ZelWiki.Models/ViewModels/Admin/PageRevisionsViewModel.cs
Normal file
11
ZelWiki.Models/ViewModels/Admin/PageRevisionsViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class PageRevisionsViewModel : ViewModelBase
|
||||
{
|
||||
public List<PageRevision> Revisions { get; set; } = new();
|
||||
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
ZelWiki.Models/ViewModels/Admin/PagesViewModel.cs
Normal file
9
ZelWiki.Models/ViewModels/Admin/PagesViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class PagesViewModel : ViewModelBase
|
||||
{
|
||||
public List<DataModels.Page> Pages { get; set; } = new();
|
||||
public string SearchString { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
12
ZelWiki.Models/ViewModels/Admin/RoleViewModel.cs
Normal file
12
ZelWiki.Models/ViewModels/Admin/RoleViewModel.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class RoleViewModel : ViewModelBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public List<AccountProfile> Users { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
ZelWiki.Models/ViewModels/Admin/RolesViewModel.cs
Normal file
9
ZelWiki.Models/ViewModels/Admin/RolesViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class RolesViewModel : ViewModelBase
|
||||
{
|
||||
public List<Role> Roles { get; set; } = new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user