添加项目文件。
This commit is contained in:
29
TightWiki.Models/DataModels/AccountProfile.cs
Normal file
29
TightWiki.Models/DataModels/AccountProfile.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using TightWiki.Library.Interfaces;
|
||||
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
/// <summary>
|
||||
/// This model combines the elements of an account and a profile into one class.
|
||||
/// </summary>
|
||||
public partial class AccountProfile : IAccountProfile
|
||||
{
|
||||
public string? Theme { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public string EmailAddress { get; set; } = string.Empty;
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; } = string.Empty;
|
||||
public string TimeZone { get; set; } = string.Empty;
|
||||
public string Country { get; set; } = string.Empty;
|
||||
public string Language { get; set; } = string.Empty;
|
||||
public string? Biography { get; set; } = string.Empty;
|
||||
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;
|
||||
}
|
||||
}
|
||||
37
TightWiki.Models/DataModels/ConfigurationEntries.cs
Normal file
37
TightWiki.Models/DataModels/ConfigurationEntries.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class ConfigurationEntries
|
||||
{
|
||||
public List<ConfigurationEntry> Collection { get; set; }
|
||||
|
||||
public ConfigurationEntries()
|
||||
{
|
||||
Collection = new();
|
||||
}
|
||||
|
||||
public ConfigurationEntries(List<ConfigurationEntry> entries)
|
||||
{
|
||||
Collection = new List<ConfigurationEntry>(entries);
|
||||
}
|
||||
|
||||
public T? Value<T>(string name)
|
||||
{
|
||||
var value = Collection.Where(o => o.Name == name).FirstOrDefault();
|
||||
if (value == null)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
return value.As<T>();
|
||||
}
|
||||
|
||||
public T Value<T>(string name, T defaultValue)
|
||||
{
|
||||
var value = Collection.Where(o => o.Name == name).FirstOrDefault();
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
return value.As<T>() ?? defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
TightWiki.Models/DataModels/ConfigurationEntry.cs
Normal file
32
TightWiki.Models/DataModels/ConfigurationEntry.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using NTDLS.Helpers;
|
||||
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class ConfigurationEntry
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ConfigurationGroupId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public int DataTypeId { get; set; }
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public bool IsEncrypted { get; set; }
|
||||
|
||||
public T? As<T>()
|
||||
{
|
||||
return Converters.ConvertTo<T>(Value);
|
||||
}
|
||||
|
||||
public T? As<T>(T defaultValue)
|
||||
{
|
||||
if (Value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
return Converters.ConvertTo<T>(Value);
|
||||
}
|
||||
|
||||
public string DataType { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
16
TightWiki.Models/DataModels/ConfigurationFlat.cs
Normal file
16
TightWiki.Models/DataModels/ConfigurationFlat.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class ConfigurationFlat
|
||||
{
|
||||
public int GroupId { get; set; }
|
||||
public string GroupName { get; set; } = string.Empty;
|
||||
public string GroupDescription { get; set; } = string.Empty;
|
||||
public int EntryId { get; set; }
|
||||
public string EntryName { get; set; } = string.Empty;
|
||||
public string EntryValue { get; set; } = string.Empty;
|
||||
public string EntryDescription { get; set; } = string.Empty;
|
||||
public bool IsEncrypted { get; set; }
|
||||
public bool IsRequired { get; set; }
|
||||
public string DataType { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/DataModels/ConfigurationGroup.cs
Normal file
9
TightWiki.Models/DataModels/ConfigurationGroup.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class ConfigurationGroup
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/DataModels/ConfigurationNest.cs
Normal file
11
TightWiki.Models/DataModels/ConfigurationNest.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class ConfigurationNest
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
public List<ConfigurationEntry> Entries = new();
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/DataModels/DatabaseInfo.cs
Normal file
11
TightWiki.Models/DataModels/DatabaseInfo.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class DatabaseInfo
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public int PageCount { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int DatabaseSize { get; set; }
|
||||
}
|
||||
}
|
||||
7
TightWiki.Models/DataModels/DeletedPageRevision.cs
Normal file
7
TightWiki.Models/DataModels/DeletedPageRevision.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class DeletedPageRevision : Page
|
||||
{
|
||||
public int PaginationPageSize { get; set; }
|
||||
}
|
||||
}
|
||||
13
TightWiki.Models/DataModels/Emoji.cs
Normal file
13
TightWiki.Models/DataModels/Emoji.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class Emoji
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Shortcut { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
public string Categories { get; set; } = string.Empty;
|
||||
public byte[]? ImageData { get; set; }
|
||||
public string MimeType { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/DataModels/EmojiCategory.cs
Normal file
9
TightWiki.Models/DataModels/EmojiCategory.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class EmojiCategory
|
||||
{
|
||||
public int EmojiId { get; set; }
|
||||
public string Category { get; set; } = string.Empty;
|
||||
public string EmojiCount { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
14
TightWiki.Models/DataModels/ImageCacheItem.cs
Normal file
14
TightWiki.Models/DataModels/ImageCacheItem.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class ImageCacheItem
|
||||
{
|
||||
public string ContentType { get; set; } = string.Empty;
|
||||
public byte[] Bytes { get; set; }
|
||||
|
||||
public ImageCacheItem(byte[] bytes, string contentType)
|
||||
{
|
||||
Bytes = bytes;
|
||||
ContentType = contentType;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
TightWiki.Models/DataModels/MenuItem.cs
Normal file
23
TightWiki.Models/DataModels/MenuItem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using TightWiki.Models.ViewModels.Admin;
|
||||
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class MenuItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Link { get; set; } = string.Empty;
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
public MenuItemViewModel ToViewModel()
|
||||
{
|
||||
return new MenuItemViewModel
|
||||
{
|
||||
Name = Name,
|
||||
Id = Id,
|
||||
Link = Link,
|
||||
Ordinal = Ordinal
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/DataModels/NamespaceStat.cs
Normal file
9
TightWiki.Models/DataModels/NamespaceStat.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class NamespaceStat
|
||||
{
|
||||
public string Namespace { get; set; } = string.Empty;
|
||||
public int CountOfPages { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
12
TightWiki.Models/DataModels/NonexistentPage.cs
Normal file
12
TightWiki.Models/DataModels/NonexistentPage.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class NonexistentPage
|
||||
{
|
||||
public int SourcePageId { get; set; }
|
||||
public string SourcePageName { get; set; } = string.Empty;
|
||||
public string SourcePageNavigation { get; set; } = string.Empty;
|
||||
public string TargetPageName { get; set; } = string.Empty;
|
||||
public string TargetPageNavigation { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
27
TightWiki.Models/DataModels/OrphanedPageAttachment.cs
Normal file
27
TightWiki.Models/DataModels/OrphanedPageAttachment.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class OrphanedPageAttachment
|
||||
{
|
||||
public int PaginationPageCount { get; set; }
|
||||
public int PageFileId { get; set; }
|
||||
public string PageName { get; set; } = string.Empty;
|
||||
public string Namespace { get; set; } = string.Empty;
|
||||
public string PageNavigation { get; set; } = string.Empty;
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public string FileNavigation { get; set; } = string.Empty; //https://localhost:7053/File/Binary/Home/test_file_b_txt/1
|
||||
public long Size { get; set; }
|
||||
public int FileRevision { get; set; }
|
||||
|
||||
public string PageTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (PageName.Contains("::"))
|
||||
{
|
||||
return PageName.Substring(PageName.IndexOf("::") + 2).Trim();
|
||||
}
|
||||
return PageName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
105
TightWiki.Models/DataModels/Page.cs
Normal file
105
TightWiki.Models/DataModels/Page.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
using TightWiki.Library.Interfaces;
|
||||
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class Page : IPage
|
||||
{
|
||||
public int Id { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The revision of this page that is being viewed. May not be the latest revision.
|
||||
/// </summary>
|
||||
public int Revision { get; set; }
|
||||
/// <summary>
|
||||
/// The most current revision of this page.
|
||||
/// </summary>
|
||||
public int MostCurrentRevision { get; set; }
|
||||
|
||||
public bool IsHistoricalVersion => Revision != MostCurrentRevision;
|
||||
|
||||
/// <summary>
|
||||
/// Lets us know whether this page exists and is loaded.
|
||||
/// </summary>
|
||||
public bool Exists => Id > 0;
|
||||
|
||||
/// <summary>
|
||||
/// Count of revisions higher than Revision.
|
||||
/// </summary>
|
||||
public int HigherRevisionCount { get; set; }
|
||||
public int DeletedRevisionCount { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public int DataHash { get; set; }
|
||||
|
||||
public string EllipseDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
int idealLength = 64;
|
||||
int maxLength = 100;
|
||||
|
||||
if (Description.Length > idealLength)
|
||||
{
|
||||
int spacePos = Description.IndexOf(' ', idealLength);
|
||||
int tabPos = Description.IndexOf('\t', idealLength);
|
||||
|
||||
idealLength = spacePos > tabPos && tabPos > 0 ? tabPos : spacePos;
|
||||
if (idealLength > 0 && idealLength < maxLength)
|
||||
{
|
||||
return Description.Substring(0, idealLength) + "...";
|
||||
}
|
||||
}
|
||||
if (Description.Length > maxLength)
|
||||
{
|
||||
return Description.Substring(0, maxLength) + "...";
|
||||
}
|
||||
return Description;
|
||||
}
|
||||
}
|
||||
|
||||
public Guid CreatedByUserId { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public Guid ModifiedByUserId { get; set; }
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
|
||||
public DateTime DeletedDate { get; set; }
|
||||
public Guid DeletedByUserId { get; set; }
|
||||
public string DeletedByUserName { get; set; } = string.Empty;
|
||||
|
||||
public int TokenWeight { get; set; }
|
||||
public string Body { get; set; } = string.Empty;
|
||||
public string CreatedByUserName { get; set; } = string.Empty;
|
||||
public string ModifiedByUserName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public int PaginationPageCount { get; set; }
|
||||
public decimal Match { get; set; }
|
||||
public decimal Weight { get; set; }
|
||||
public decimal Score { get; set; }
|
||||
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Name.Contains("::"))
|
||||
{
|
||||
return Name.Substring(Name.IndexOf("::") + 2).Trim();
|
||||
}
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
|
||||
public string Namespace
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Name.Contains("::"))
|
||||
{
|
||||
return Name.Substring(0, Name.IndexOf("::")).Trim();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
TightWiki.Models/DataModels/PageCache.cs
Normal file
20
TightWiki.Models/DataModels/PageCache.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to cache pre-processed wiki results.
|
||||
/// </summary>
|
||||
public class PageCache
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom page title set by a call to @@Title("...")
|
||||
/// </summary>
|
||||
public string? PageTitle { get; set; }
|
||||
public string Body { get; set; }
|
||||
|
||||
public PageCache(string body)
|
||||
{
|
||||
Body = body;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
15
TightWiki.Models/DataModels/PageComment.cs
Normal file
15
TightWiki.Models/DataModels/PageComment.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class PageComment
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int PageId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public string Body { get; set; } = string.Empty;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string UserNavigation { get; set; } = string.Empty;
|
||||
public string PageName { get; set; } = string.Empty;
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
34
TightWiki.Models/DataModels/PageCompilationStatistics.cs
Normal file
34
TightWiki.Models/DataModels/PageCompilationStatistics.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class PageCompilationStatistics
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Name.Contains("::"))
|
||||
{
|
||||
return Name.Substring(Name.IndexOf("::") + 2).Trim();
|
||||
}
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
|
||||
public string Namespace { get; set; } = string.Empty;
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public DateTime LatestBuild { get; set; }
|
||||
public decimal Compilations { get; set; }
|
||||
public decimal AvgBuildTimeMs { get; set; }
|
||||
public decimal AvgWikiMatches { get; set; }
|
||||
public decimal TotalErrorCount { get; set; }
|
||||
public decimal AvgOutgoingLinkCount { get; set; }
|
||||
public decimal AvgTagCount { get; set; }
|
||||
public decimal AvgRawBodySize { get; set; }
|
||||
public decimal AvgWikifiedBodySize { get; set; }
|
||||
|
||||
public int PaginationPageSize { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
20
TightWiki.Models/DataModels/PageFileAttachment.cs
Normal file
20
TightWiki.Models/DataModels/PageFileAttachment.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using NTDLS.Helpers;
|
||||
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class PageFileAttachment
|
||||
{
|
||||
public int PaginationPageSize { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
public int Id { get; set; }
|
||||
public int PageId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string ContentType { get; set; } = string.Empty;
|
||||
public long Size { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public byte[] Data { get; set; } = Array.Empty<byte>();
|
||||
public string FileNavigation { get; set; } = string.Empty;
|
||||
public string PageNavigation { get; set; } = string.Empty;
|
||||
public string FriendlySize => Formatters.FileSize(Size);
|
||||
}
|
||||
}
|
||||
21
TightWiki.Models/DataModels/PageFileAttachmentInfo.cs
Normal file
21
TightWiki.Models/DataModels/PageFileAttachmentInfo.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class PageFileAttachmentInfo
|
||||
{
|
||||
public int PaginationPageSize { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
public int Id { get; set; }
|
||||
public int PageId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string ContentType { get; set; } = string.Empty;
|
||||
public long Size { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public string FileNavigation { get; set; } = string.Empty;
|
||||
public string PageNavigation { get; set; } = string.Empty;
|
||||
public int FileRevision { get; set; }
|
||||
public Guid CreatedByUserId { get; set; }
|
||||
public string CreatedByUserName { get; set; } = string.Empty;
|
||||
public string CreatedByNavigation { get; set; } = string.Empty;
|
||||
public string FriendlySize => NTDLS.Helpers.Formatters.FileSize(Size);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class PageFileRevisionAttachmentInfo
|
||||
{
|
||||
public int Revision { get; set; }
|
||||
public string ContentType { get; set; } = string.Empty;
|
||||
public int Size { get; set; }
|
||||
public int DataHash { get; set; }
|
||||
public int PageId { get; set; }
|
||||
public int PageFileId { get; set; }
|
||||
}
|
||||
}
|
||||
22
TightWiki.Models/DataModels/PageRevision.cs
Normal file
22
TightWiki.Models/DataModels/PageRevision.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class PageRevision
|
||||
{
|
||||
public int PaginationPageSize { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
public int PageId { get; set; }
|
||||
public string ModifiedByUserName { get; set; } = string.Empty;
|
||||
public Guid ModifiedByUserId { get; set; }
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public int Revision { get; set; }
|
||||
public int HigherRevisionCount { get; set; }
|
||||
public int HighestRevision { get; set; }
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public Guid CreatedByUserId { get; set; }
|
||||
public string CreatedByUserName { get; set; } = string.Empty;
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public string ChangeSummary { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
10
TightWiki.Models/DataModels/PageSearchToken.cs
Normal file
10
TightWiki.Models/DataModels/PageSearchToken.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class PageSearchToken
|
||||
{
|
||||
public int PageId { get; set; }
|
||||
public double Match { get; set; }
|
||||
public double Weight { get; set; }
|
||||
public double Score { get; set; }
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/DataModels/PageTag.cs
Normal file
9
TightWiki.Models/DataModels/PageTag.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class PageTag
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int PageId { get; set; }
|
||||
public string Tag { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
22
TightWiki.Models/DataModels/PageToken.cs
Normal file
22
TightWiki.Models/DataModels/PageToken.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class PageToken
|
||||
{
|
||||
public int PageId { get; set; }
|
||||
public string Token { get; set; } = string.Empty;
|
||||
public string DoubleMetaphone { get; set; } = string.Empty;
|
||||
public double Weight { get; set; }
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
return obj is PageToken other
|
||||
&& PageId == other.PageId
|
||||
&& string.Equals(Token, other.Token, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(PageId, Token.ToLower());
|
||||
}
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/DataModels/ProcessingInstruction.cs
Normal file
11
TightWiki.Models/DataModels/ProcessingInstruction.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class ProcessingInstruction
|
||||
{
|
||||
public int PageId { get; set; }
|
||||
/// <summary>
|
||||
/// TightWiki.Library.Constants.WikiInstruction
|
||||
/// </summary>
|
||||
public string Instruction { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class ProcessingInstructionCollection
|
||||
{
|
||||
public List<ProcessingInstruction> Collection { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the collection contains the given processing instruction.
|
||||
/// </summary>
|
||||
/// <param name="wikiInstruction">WikiInstruction.Protect</param>
|
||||
/// <returns></returns>
|
||||
public bool Contains(string wikiInstruction)
|
||||
=> Collection.Any(o => string.Equals(o.Instruction, wikiInstruction, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
}
|
||||
8
TightWiki.Models/DataModels/ProfileAvatar.cs
Normal file
8
TightWiki.Models/DataModels/ProfileAvatar.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class ProfileAvatar
|
||||
{
|
||||
public byte[]? Bytes { get; set; }
|
||||
public string ContentType { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
26
TightWiki.Models/DataModels/RelatedPage.cs
Normal file
26
TightWiki.Models/DataModels/RelatedPage.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class RelatedPage
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public int Matches { get; set; }
|
||||
public int PaginationPageSize { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Name.Contains("::"))
|
||||
{
|
||||
return Name.Substring(Name.IndexOf("::") + 2).Trim();
|
||||
}
|
||||
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/DataModels/Role.cs
Normal file
9
TightWiki.Models/DataModels/Role.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class Role
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
8
TightWiki.Models/DataModels/TagAssociation.cs
Normal file
8
TightWiki.Models/DataModels/TagAssociation.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class TagAssociation
|
||||
{
|
||||
public string Tag { get; set; } = string.Empty;
|
||||
public int PageCount { get; set; }
|
||||
}
|
||||
}
|
||||
21
TightWiki.Models/DataModels/TagCloudItem.cs
Normal file
21
TightWiki.Models/DataModels/TagCloudItem.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class TagCloudItem
|
||||
{
|
||||
public string Name = "";
|
||||
public string HTML = "";
|
||||
public int Rank = 0;
|
||||
|
||||
public TagCloudItem(string name, int rank, string html)
|
||||
{
|
||||
Name = name;
|
||||
HTML = html;
|
||||
Rank = rank;
|
||||
}
|
||||
|
||||
public static int CompareItem(TagCloudItem x, TagCloudItem y)
|
||||
{
|
||||
return string.Compare(x.Name, y.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/DataModels/UpsertEmoji.cs
Normal file
11
TightWiki.Models/DataModels/UpsertEmoji.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class UpsertEmoji
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public List<string> Categories { get; set; } = new();
|
||||
public byte[]? ImageData { get; set; }
|
||||
public string MimeType { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/DataModels/UserRole.cs
Normal file
9
TightWiki.Models/DataModels/UserRole.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public partial class UserRole
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public int RoleId { get; set; }
|
||||
}
|
||||
}
|
||||
17
TightWiki.Models/DataModels/WikiDatabaseStatistics.cs
Normal file
17
TightWiki.Models/DataModels/WikiDatabaseStatistics.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class WikiDatabaseStatistics
|
||||
{
|
||||
public int Pages { get; set; }
|
||||
public int IntraLinks { get; set; }
|
||||
public int PageRevisions { get; set; }
|
||||
public int PageAttachments { get; set; }
|
||||
public int PageAttachmentRevisions { get; set; }
|
||||
public int PageTags { get; set; }
|
||||
public int PageSearchTokens { get; set; }
|
||||
public int Users { get; set; }
|
||||
public int Profiles { get; set; }
|
||||
public int Exceptions { get; set; }
|
||||
public int Namespaces { get; set; }
|
||||
}
|
||||
}
|
||||
12
TightWiki.Models/DataModels/WikiException.cs
Normal file
12
TightWiki.Models/DataModels/WikiException.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace TightWiki.Models.DataModels
|
||||
{
|
||||
public class WikiException
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Text { get; set; } = string.Empty;
|
||||
public string ExceptionText { get; set; } = string.Empty;
|
||||
public string StackTrace { get; set; } = string.Empty;
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
44
TightWiki.Models/GlobalConfiguration.cs
Normal file
44
TightWiki.Models/GlobalConfiguration.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using TightWiki.Library;
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models
|
||||
{
|
||||
public static class GlobalConfiguration
|
||||
{
|
||||
public static readonly string[] AllowableImageTypes = ["image/png", "image/jpeg", "image/bmp", "image/gif", "image/tiff"];
|
||||
public static string BasePath { get; set; } = string.Empty;
|
||||
public static Theme SystemTheme { get; set; } = new();
|
||||
public static bool IsDebug { get; set; }
|
||||
public static bool AllowSignup { get; set; }
|
||||
public static List<Emoji> Emojis { get; set; } = new();
|
||||
public static string BrandImageSmall { get; set; } = string.Empty;
|
||||
public static string Name { get; set; } = string.Empty;
|
||||
public static string FooterBlurb { get; set; } = string.Empty;
|
||||
public static string Copyright { get; set; } = string.Empty;
|
||||
public static List<MenuItem> MenuItems { get; set; } = new();
|
||||
public static string HTMLHeader { get; set; } = string.Empty;
|
||||
public static string HTMLFooter { get; set; } = string.Empty;
|
||||
public static string HTMLPreBody { get; set; } = string.Empty;
|
||||
public static string HTMLPostBody { get; set; } = string.Empty;
|
||||
public static bool IncludeWikiDescriptionInMeta { get; set; }
|
||||
public static bool IncludeWikiTagsInMeta { get; set; }
|
||||
public static bool EnablePageComments { get; set; }
|
||||
public static bool EnablePublicProfiles { get; set; }
|
||||
public static bool FixedMenuPosition { get; set; }
|
||||
public static bool ShowCommentsOnPageFooter { get; set; }
|
||||
public static bool IncludeSearchOnNavbar { get; set; }
|
||||
public static int PageCacheSeconds { get; set; }
|
||||
public static int CacheMemoryLimitMB { get; set; }
|
||||
public static int DefaultProfileRecentlyModifiedCount { get; set; }
|
||||
public static bool PreLoadAnimatedEmojis { get; set; } = true;
|
||||
public static bool RecordCompilationMetrics { get; set; }
|
||||
public static bool ShowLastModifiedOnPageFooter { get; set; }
|
||||
public static string DefaultTimeZone { get; set; } = string.Empty;
|
||||
public static string Address { get; set; } = string.Empty;
|
||||
public static int DefaultEmojiHeight { get; set; }
|
||||
public static bool AllowGoogleAuthentication { get; set; }
|
||||
public static int MaxAvatarFileSize { get; set; } = 1048576;
|
||||
public static int MaxAttachmentFileSize { get; set; } = 5242880;
|
||||
public static int MaxEmojiFileSize { get; set; } = 524288;
|
||||
}
|
||||
}
|
||||
18
TightWiki.Models/TightWiki.Models.csproj
Normal file
18
TightWiki.Models/TightWiki.Models.csproj
Normal file
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.20.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<DebugType>None</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TightWiki.Library\TightWiki.Library.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,81 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public partial class AccountProfileAccountViewModel
|
||||
{
|
||||
[Display(Name = "Theme")]
|
||||
public string? Theme { get; set; } = string.Empty;
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
[Display(Name = "Email Address")]
|
||||
[Required(ErrorMessage = "Email address is required")]
|
||||
public string EmailAddress { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Account Name")]
|
||||
[Required(ErrorMessage = "Account name is required")]
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
|
||||
public string? Navigation { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "First Name")]
|
||||
public string? FirstName { get; set; }
|
||||
|
||||
[Display(Name = "Last Name")]
|
||||
public string? LastName { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Time-Zone")]
|
||||
[Required(ErrorMessage = "TimeZone is required")]
|
||||
public string TimeZone { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Country")]
|
||||
[Required(ErrorMessage = "Country is required")]
|
||||
public string Country { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Language")]
|
||||
[Required(ErrorMessage = "Language is required")]
|
||||
public string Language { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Biography")]
|
||||
public string? Biography { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Email Confirmed?")]
|
||||
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
TightWiki.Models/ViewModels/Admin/AccountProfileViewModel.cs
Normal file
17
TightWiki.Models/ViewModels/Admin/AccountProfileViewModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using TightWiki.Library;
|
||||
using TightWiki.Models.DataModels;
|
||||
using TightWiki.Models.ViewModels.Shared;
|
||||
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/AccountsViewModel.cs
Normal file
11
TightWiki.Models/ViewModels/Admin/AccountsViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.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; }
|
||||
}
|
||||
}
|
||||
10
TightWiki.Models/ViewModels/Admin/AddEmojiViewModel.cs
Normal file
10
TightWiki.Models/ViewModels/Admin/AddEmojiViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class AddEmojiViewModel : ViewModelBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? OriginalName { get; set; }
|
||||
public string Categories { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
15
TightWiki.Models/ViewModels/Admin/ConfigurationViewModel.cs
Normal file
15
TightWiki.Models/ViewModels/Admin/ConfigurationViewModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using TightWiki.Library;
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/DatabaseViewModel.cs
Normal file
9
TightWiki.Models/ViewModels/Admin/DatabaseViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class DatabaseViewModel : ViewModelBase
|
||||
{
|
||||
public List<DatabaseInfo> Info { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/DeletedPageViewModel.cs
Normal file
13
TightWiki.Models/ViewModels/Admin/DeletedPageViewModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.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 TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.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; }
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/ViewModels/Admin/EmojiViewModel.cs
Normal file
11
TightWiki.Models/ViewModels/Admin/EmojiViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class EmojiViewModel : ViewModelBase
|
||||
{
|
||||
public Emoji Emoji { get; set; } = new();
|
||||
public string OriginalName { get; set; } = string.Empty;
|
||||
public string Categories { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/ViewModels/Admin/EmojisViewModel.cs
Normal file
11
TightWiki.Models/ViewModels/Admin/EmojisViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/ExceptionViewModel.cs
Normal file
9
TightWiki.Models/ViewModels/Admin/ExceptionViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class ExceptionViewModel : ViewModelBase
|
||||
{
|
||||
public WikiException Exception { get; set; } = new();
|
||||
}
|
||||
}
|
||||
10
TightWiki.Models/ViewModels/Admin/ExceptionsViewModel.cs
Normal file
10
TightWiki.Models/ViewModels/Admin/ExceptionsViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class ExceptionsViewModel : ViewModelBase
|
||||
{
|
||||
public List<WikiException> Exceptions { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
23
TightWiki.Models/ViewModels/Admin/MenuItemViewModel.cs
Normal file
23
TightWiki.Models/ViewModels/Admin/MenuItemViewModel.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MenuItemViewModel : ViewModelBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Link { get; set; } = string.Empty;
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
public MenuItem ToDataModel()
|
||||
{
|
||||
return new MenuItem
|
||||
{
|
||||
Name = Name,
|
||||
Id = Id,
|
||||
Link = Link,
|
||||
Ordinal = Ordinal
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/ViewModels/Admin/MenuItemsViewModel.cs
Normal file
9
TightWiki.Models/ViewModels/Admin/MenuItemsViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MenuItemsViewModel : ViewModelBase
|
||||
{
|
||||
public List<MenuItem> Items { get; set; } = new();
|
||||
}
|
||||
}
|
||||
10
TightWiki.Models/ViewModels/Admin/MetricsViewModel.cs
Normal file
10
TightWiki.Models/ViewModels/Admin/MetricsViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MetricsViewModel : ViewModelBase
|
||||
{
|
||||
public WikiDatabaseStatistics Metrics { get; set; } = new();
|
||||
public string ApplicationVersion { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
10
TightWiki.Models/ViewModels/Admin/MissingPagesViewModel.cs
Normal file
10
TightWiki.Models/ViewModels/Admin/MissingPagesViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MissingPagesViewModel : ViewModelBase
|
||||
{
|
||||
public List<NonexistentPage> Pages { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/ViewModels/Admin/NamespaceViewModel.cs
Normal file
9
TightWiki.Models/ViewModels/Admin/NamespaceViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/NamespacesViewModel.cs
Normal file
10
TightWiki.Models/ViewModels/Admin/NamespacesViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class NamespacesViewModel : ViewModelBase
|
||||
{
|
||||
public List<NamespaceStat> Namespaces { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TightWiki.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 TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class PageCompilationStatisticsViewModel : ViewModelBase
|
||||
{
|
||||
public List<PageCompilationStatistics> Statistics { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
10
TightWiki.Models/ViewModels/Admin/PageModerateViewModel.cs
Normal file
10
TightWiki.Models/ViewModels/Admin/PageModerateViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/PageRevisionsViewModel.cs
Normal file
11
TightWiki.Models/ViewModels/Admin/PageRevisionsViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class PageRevisionsViewModel : ViewModelBase
|
||||
{
|
||||
public List<PageRevision> Revisions { get; set; } = new();
|
||||
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/ViewModels/Admin/PagesViewModel.cs
Normal file
9
TightWiki.Models/ViewModels/Admin/PagesViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/RoleViewModel.cs
Normal file
12
TightWiki.Models/ViewModels/Admin/RoleViewModel.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.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
TightWiki.Models/ViewModels/Admin/RolesViewModel.cs
Normal file
9
TightWiki.Models/ViewModels/Admin/RolesViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class RolesViewModel : ViewModelBase
|
||||
{
|
||||
public List<Role> Roles { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace TightWiki.Models.ViewModels
|
||||
{
|
||||
public class ExternalLoginCallbackViewModel : ViewModelBase
|
||||
{
|
||||
}
|
||||
}
|
||||
12
TightWiki.Models/ViewModels/File/FileAttachmentViewModel.cs
Normal file
12
TightWiki.Models/ViewModels/File/FileAttachmentViewModel.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.File
|
||||
{
|
||||
public class FileAttachmentViewModel : ViewModelBase
|
||||
{
|
||||
public string PageNavigation { get; set; } = string.Empty;
|
||||
public int PageRevision { get; set; } = 0;
|
||||
|
||||
public List<PageFileAttachmentInfo> Files { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.File
|
||||
{
|
||||
public class PageFileRevisionsViewModel : ViewModelBase
|
||||
{
|
||||
public string PageNavigation { get; set; } = string.Empty;
|
||||
public string FileNavigation { get; set; } = string.Empty;
|
||||
public List<PageFileAttachmentInfo> Revisions { get; set; } = new();
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
8
TightWiki.Models/ViewModels/Page/BrowseViewModel.cs
Normal file
8
TightWiki.Models/ViewModels/Page/BrowseViewModel.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class BrowseViewModel : ViewModelBase
|
||||
{
|
||||
public string? AssociatedPages { get; set; }
|
||||
public string? TagCloud { get; set; }
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/ViewModels/Page/PageCommentsViewModel.cs
Normal file
11
TightWiki.Models/ViewModels/Page/PageCommentsViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class PageCommentsViewModel : ViewModelBase
|
||||
{
|
||||
public List<PageComment> Comments { get; set; } = new();
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
10
TightWiki.Models/ViewModels/Page/PageDeleteViewModel.cs
Normal file
10
TightWiki.Models/ViewModels/Page/PageDeleteViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class PageDeleteViewModel : ViewModelBase
|
||||
{
|
||||
public int CountOfAttachments { get; set; }
|
||||
public int MostCurrentRevision { get; set; }
|
||||
public string? PageName { get; set; }
|
||||
public int PageRevision { get; set; }
|
||||
}
|
||||
}
|
||||
20
TightWiki.Models/ViewModels/Page/PageDisplayViewModel.cs
Normal file
20
TightWiki.Models/ViewModels/Page/PageDisplayViewModel.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class PageDisplayViewModel : ViewModelBase
|
||||
{
|
||||
public string Body { get; set; } = string.Empty;
|
||||
public string ModifiedByUserName { get; set; } = string.Empty;
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
public List<PageComment> Comments { get; set; } = new();
|
||||
public bool HideFooterComments { get; set; }
|
||||
public bool HideFooterLastModified { get; set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public string Namespace { get; set; } = string.Empty;
|
||||
public int Revision { get; set; }
|
||||
public int MostCurrentRevision { get; set; }
|
||||
}
|
||||
}
|
||||
15
TightWiki.Models/ViewModels/Page/PageEditViewModel.cs
Normal file
15
TightWiki.Models/ViewModels/Page/PageEditViewModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class PageEditViewModel : ViewModelBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
public string? Body { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
15
TightWiki.Models/ViewModels/Page/PageRevertViewModel.cs
Normal file
15
TightWiki.Models/ViewModels/Page/PageRevertViewModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class PageRevertViewModel : ViewModelBase
|
||||
{
|
||||
public string? PageName { get; set; }
|
||||
/// <summary>
|
||||
/// The highest revision for the page.
|
||||
/// </summary>
|
||||
public int HighestRevision { get; set; }
|
||||
/// <summary>
|
||||
/// The number of revisions that are higher than the current page revision.
|
||||
/// </summary>
|
||||
public int HigherRevisionCount { get; set; }
|
||||
}
|
||||
}
|
||||
11
TightWiki.Models/ViewModels/Page/PageRevisionsViewModel.cs
Normal file
11
TightWiki.Models/ViewModels/Page/PageRevisionsViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class RevisionsViewModel : ViewModelBase
|
||||
{
|
||||
public List<PageRevision> Revisions { get; set; } = new();
|
||||
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
9
TightWiki.Models/ViewModels/Page/PageSearchViewModel.cs
Normal file
9
TightWiki.Models/ViewModels/Page/PageSearchViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TightWiki.Models.ViewModels.Page
|
||||
{
|
||||
public class PageSearchViewModel : ViewModelBase
|
||||
{
|
||||
public List<DataModels.Page> Pages { get; set; } = new();
|
||||
public string SearchString { get; set; } = string.Empty;
|
||||
public int PaginationPageCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Profile
|
||||
{
|
||||
public partial class AccountProfileAccountViewModel
|
||||
{
|
||||
[Display(Name = "Theme")]
|
||||
public string? Theme { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "UserId is required")]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
[Display(Name = "Email Address")]
|
||||
public string EmailAddress { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Account Name")]
|
||||
[Required(ErrorMessage = "Account Name is required")]
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "First Name")]
|
||||
public string? FirstName { get; set; }
|
||||
|
||||
[Display(Name = "Last Name")]
|
||||
public string? LastName { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Time-Zone")]
|
||||
[Required(ErrorMessage = "TimeZone is required")]
|
||||
public string TimeZone { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Country")]
|
||||
[Required(ErrorMessage = "Country is required")]
|
||||
public string Country { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Language")]
|
||||
[Required(ErrorMessage = "Language is required")]
|
||||
public string Language { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Biography")]
|
||||
public string? Biography { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Email Confirmed?")]
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using TightWiki.Library;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Profile
|
||||
{
|
||||
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 AccountProfileAccountViewModel AccountProfile { get; set; } = new();
|
||||
}
|
||||
}
|
||||
14
TightWiki.Models/ViewModels/Profile/AccountViewModel.cs
Normal file
14
TightWiki.Models/ViewModels/Profile/AccountViewModel.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using TightWiki.Library;
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Profile
|
||||
{
|
||||
public class AccountViewModel : ViewModelBase
|
||||
{
|
||||
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 AccountProfile Account { get; set; } = new();
|
||||
}
|
||||
}
|
||||
6
TightWiki.Models/ViewModels/Profile/ConfirmViewModel.cs
Normal file
6
TightWiki.Models/ViewModels/Profile/ConfirmViewModel.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace TightWiki.Models.ViewModels.Profile
|
||||
{
|
||||
public class ConfirmViewModel : ViewModelBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace TightWiki.Models.ViewModels.Profile
|
||||
{
|
||||
public class DeleteAccountViewModel : ViewModelBase
|
||||
{
|
||||
public string? AccountName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace TightWiki.Models.ViewModels.Profile
|
||||
{
|
||||
public class DeletedAccountViewModel : ViewModelBase
|
||||
{
|
||||
}
|
||||
}
|
||||
36
TightWiki.Models/ViewModels/Profile/PublicViewModel.cs
Normal file
36
TightWiki.Models/ViewModels/Profile/PublicViewModel.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TightWiki.Models.DataModels;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Profile
|
||||
{
|
||||
public class PublicViewModel : ViewModelBase
|
||||
{
|
||||
public string Navigation { get; set; } = string.Empty;
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Display(Name = "Name")]
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Personal Bio")]
|
||||
public string Biography { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Avatar")]
|
||||
[BindNever]
|
||||
public byte[]? Avatar { get; set; }
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Country")]
|
||||
public string Country { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Language")]
|
||||
public string Language { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Time Zone")]
|
||||
public string TimeZone { get; set; } = string.Empty;
|
||||
|
||||
public List<PageRevision> RecentlyModified { get; set; } = new();
|
||||
}
|
||||
}
|
||||
20
TightWiki.Models/ViewModels/Shared/CredentialViewModel.cs
Normal file
20
TightWiki.Models/ViewModels/Shared/CredentialViewModel.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace TightWiki.Models.ViewModels.Shared
|
||||
{
|
||||
public class CredentialViewModel
|
||||
{
|
||||
public const string NOTSET = "\\__!!_PASSWORD_NOT_SET_!!__//";
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Password")]
|
||||
[StringLength(50, MinimumLength = 6, ErrorMessage = "Must have a minimum length of 5.")]
|
||||
public string Password { get; set; } = NOTSET;
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Re-enter Password")]
|
||||
[StringLength(50, MinimumLength = 6, ErrorMessage = "Must have a minimum length of 5.")]
|
||||
[Compare("Password", ErrorMessage = "The two entered passwords do not match.")]
|
||||
public string ComparePassword { get; set; } = NOTSET;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TightWiki.Models.ViewModels.Utility
|
||||
{
|
||||
public class ConfirmActionViewModel : ViewModelBase
|
||||
{
|
||||
public string ControllerURL { get; set; } = string.Empty;
|
||||
public string YesRedirectURL { get; set; } = string.Empty;
|
||||
public string NoRedirectURL { get; set; } = string.Empty;
|
||||
public string Message { get; set; } = string.Empty;
|
||||
public string Style { get; set; } = string.Empty;
|
||||
public string? Parameter { get; set; } = string.Empty;
|
||||
public bool UserSelection { get; set; }
|
||||
}
|
||||
}
|
||||
8
TightWiki.Models/ViewModels/Utility/NotifyViewModel.cs
Normal file
8
TightWiki.Models/ViewModels/Utility/NotifyViewModel.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TightWiki.Models.ViewModels.Utility
|
||||
{
|
||||
public class NotifyViewModel : ViewModelBase
|
||||
{
|
||||
public string RedirectURL { get; set; } = string.Empty;
|
||||
public int RedirectTimeout { get; set; }
|
||||
}
|
||||
}
|
||||
8
TightWiki.Models/ViewModels/ViewModelBase.cs
Normal file
8
TightWiki.Models/ViewModels/ViewModelBase.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TightWiki.Models.ViewModels
|
||||
{
|
||||
public class ViewModelBase
|
||||
{
|
||||
public string SuccessMessage { get; set; } = string.Empty;
|
||||
public string ErrorMessage { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user