我滴个乖乖

This commit is contained in:
zel
2025-02-20 15:20:28 +08:00
parent 4b54cca70b
commit 485cfcd6f2
2343 changed files with 495732 additions and 1022 deletions

View File

@@ -0,0 +1,13 @@
namespace ZelWiki.Library.Interfaces
{
public interface IAccountProfile
{
public string Role { get; set; }
public Guid UserId { get; set; }
public string EmailAddress { get; set; }
public string AccountName { get; set; }
public string Navigation { get; set; }
public string? Theme { get; set; }
public string TimeZone { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
namespace ZelWiki.Library.Interfaces
{
public interface IPage
{
public int Id { get; set; }
public int Revision { get; set; }
public int MostCurrentRevision { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Namespace { get; }
public string Title { get; }
public string Body { get; }
public string Navigation { get; }
public DateTime CreatedDate { get; set; }
public DateTime ModifiedDate { get; set; }
public bool IsHistoricalVersion { get; }
public bool Exists { get; }
}
}

View File

@@ -0,0 +1,44 @@
using Microsoft.AspNetCore.Http;
namespace ZelWiki.Library.Interfaces
{
public interface ISessionState
{
public IAccountProfile? Profile { get; set; }
IQueryCollection? QueryString { get; set; }
/// <summary>
/// Is the current user (or anonymous) allowed to view?
/// </summary>
public bool CanView => true;
/// <summary>
/// Is the current user allowed to edit?
/// </summary>
public bool CanEdit { get; }
/// <summary>
/// Is the current user allowed to perform administrative functions?
/// </summary>
public bool CanAdmin { get; }
/// <summary>
/// Is the current user allowed to moderate content (such as delete comments, and view moderation tools)?
/// </summary>
public bool CanModerate { get; }
/// <summary>
/// Is the current user allowed to create pages?
/// </summary>
public bool CanCreate { get; }
/// <summary>
/// Is the current user allowed to delete unprotected pages?
/// </summary>
public bool CanDelete { get; }
public DateTime LocalizeDateTime(DateTime datetime);
public TimeZoneInfo GetPreferredTimeZone();
}
}

View File

@@ -0,0 +1,7 @@
namespace ZelWiki.Library.Interfaces
{
public interface IWikiEmailSender
{
Task SendEmailAsync(string email, string subject, string htmlMessage);
}
}