Merge pull request #1385 from 2sic-forks/dev
This commit is contained in:
commit
fc3ba14d0f
2
Oqtane.Client/Oqtane.Client.csproj.DotSettings
Normal file
2
Oqtane.Client/Oqtane.Client.csproj.DotSettings
Normal file
|
@ -0,0 +1,2 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=services_005Cinterfaces/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -5,15 +5,21 @@ using System.Linq;
|
|||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <inheritdoc cref="IAliasService" />
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class AliasService : ServiceBase, IAliasService
|
||||
{
|
||||
|
||||
private readonly SiteState _siteState;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor - should only be used by Dependency Injection
|
||||
/// </summary>
|
||||
public AliasService(HttpClient http, SiteState siteState) : base(http)
|
||||
{
|
||||
_siteState = siteState;
|
||||
|
@ -21,32 +27,38 @@ namespace Oqtane.Services
|
|||
|
||||
private string ApiUrl => CreateApiUrl("Alias", _siteState.Alias);
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<List<Alias>> GetAliasesAsync()
|
||||
{
|
||||
List<Alias> aliases = await GetJsonAsync<List<Alias>>(ApiUrl);
|
||||
return aliases.OrderBy(item => item.Name).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<Alias> GetAliasAsync(int aliasId)
|
||||
{
|
||||
return await GetJsonAsync<Alias>($"{ApiUrl}/{aliasId}");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<Alias> GetAliasAsync(string path, DateTime lastSyncDate)
|
||||
{
|
||||
// tenant agnostic as SiteState does not exist
|
||||
return await GetJsonAsync<Alias>($"{CreateApiUrl("Alias", null)}/name/?path={WebUtility.UrlEncode(path)}&sync={lastSyncDate.ToString("yyyyMMddHHmmssfff")}");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<Alias> AddAliasAsync(Alias alias)
|
||||
{
|
||||
return await PostJsonAsync<Alias>(ApiUrl, alias);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<Alias> UpdateAliasAsync(Alias alias)
|
||||
{
|
||||
return await PutJsonAsync<Alias>($"{ApiUrl}/{alias.AliasId}", alias);
|
||||
}
|
||||
/// <inheritdoc />
|
||||
public async Task DeleteAliasAsync(int aliasId)
|
||||
{
|
||||
await DeleteAsync($"{ApiUrl}/{aliasId}");
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Threading.Tasks;
|
|||
using System.Net.Http;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class DatabaseService : ServiceBase, IDatabaseService
|
||||
{
|
||||
|
||||
|
|
|
@ -4,12 +4,14 @@ using System.Net.Http;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.JSInterop;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.UI;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class FileService : ServiceBase, IFileService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -7,9 +7,11 @@ using Oqtane.Shared;
|
|||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class FolderService : ServiceBase, IFolderService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
using Oqtane.Models;
|
||||
using System.Threading.Tasks;
|
||||
using System.Net.Http;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class InstallationService : ServiceBase, IInstallationService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -1,22 +1,55 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Retrieve and store <see cref="Oqtane.Models.Alias"/> information.
|
||||
/// </summary>
|
||||
public interface IAliasService
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all aliases in the system
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Alias>> GetAliasesAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Get a single alias
|
||||
/// </summary>
|
||||
/// <param name="aliasId">The <see cref="Oqtane.Models.Alias"/> ID, not to be confused with a <see cref="Oqtane.Models.Site"/> ID</param>
|
||||
/// <returns></returns>
|
||||
Task<Alias> GetAliasAsync(int aliasId);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the Alias object of a URL.
|
||||
/// </summary>
|
||||
/// <param name="url">The URL - todoc - is this only the root, or can it be a longer path?</param>
|
||||
/// <param name="lastSyncDate">todoc - unclear what this is for</param>
|
||||
/// <returns></returns>
|
||||
Task<Alias> GetAliasAsync(string url, DateTime lastSyncDate);
|
||||
|
||||
/// <summary>
|
||||
/// Save another <see cref="Oqtane.Models.Alias"/> in the DB. It must already contain all the information incl. <see cref="Oqtane.Models.Tenant"/> it belongs to.
|
||||
/// </summary>
|
||||
/// <param name="alias">An <see cref="Oqtane.Models.Alias"/> to add.</param>
|
||||
/// <returns></returns>
|
||||
Task<Alias> AddAliasAsync(Alias alias);
|
||||
|
||||
/// <summary>
|
||||
/// Update an <see cref="Oqtane.Models.Alias"/> in the DB. Make sure the object is correctly filled, as it must update an existing record.
|
||||
/// </summary>
|
||||
/// <param name="alias">The <see cref="Oqtane.Models.Alias"/> to update.</param>
|
||||
/// <returns></returns>
|
||||
Task<Alias> UpdateAliasAsync(Alias alias);
|
||||
|
||||
/// <summary>
|
||||
/// Remove an <see cref="Oqtane.Models.Alias"/> from the DB.
|
||||
/// </summary>
|
||||
/// <param name="aliasId">The Alias ID, not to be confused with a Site ID.</param>
|
||||
/// <returns></returns>
|
||||
Task DeleteAliasAsync(int aliasId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Threading.Tasks;
|
|||
using System.Net.Http;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class JobLogService : ServiceBase, IJobLogService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Threading.Tasks;
|
|||
using System.Net.Http;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class JobService : ServiceBase, IJobService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -2,11 +2,13 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class LanguageService : ServiceBase, ILanguageService
|
||||
{
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class LocalizationService : ServiceBase, ILocalizationService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -4,12 +4,14 @@ using System.Net.Http;
|
|||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class LogService : ServiceBase, ILogService
|
||||
{
|
||||
|
||||
|
|
|
@ -5,11 +5,13 @@ using System.Net.Http;
|
|||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.UI;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class ModuleDefinitionService : ServiceBase, IModuleDefinitionService
|
||||
{
|
||||
private readonly HttpClient _http;
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class ModuleService : ServiceBase, IModuleService
|
||||
{
|
||||
|
||||
|
|
|
@ -4,9 +4,11 @@ using System.Net.Http;
|
|||
using Oqtane.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class NotificationService : ServiceBase, INotificationService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Collections.Generic;
|
|||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class PackageService : ServiceBase, IPackageService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
using Oqtane.Models;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class PageModuleService : ServiceBase, IPageModuleService
|
||||
{
|
||||
|
||||
|
|
|
@ -6,9 +6,11 @@ using System.Collections.Generic;
|
|||
using Oqtane.Shared;
|
||||
using System;
|
||||
using System.Net;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class PageService : ServiceBase, IPageService
|
||||
{
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Threading.Tasks;
|
|||
using System.Net.Http;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class ProfileService : ServiceBase, IProfileService
|
||||
{
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Threading.Tasks;
|
|||
using System.Net.Http;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class RoleService : ServiceBase, IRoleService
|
||||
{
|
||||
|
||||
|
|
|
@ -4,11 +4,13 @@ using System.Net.Http;
|
|||
using System.Net.Http.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class ServiceBase
|
||||
{
|
||||
private readonly HttpClient _http;
|
||||
|
|
|
@ -4,10 +4,12 @@ using System.Threading.Tasks;
|
|||
using System.Net.Http;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class SettingService : ServiceBase, ISettingService
|
||||
{
|
||||
|
||||
|
|
|
@ -5,9 +5,11 @@ using System.Linq;
|
|||
using System.Collections.Generic;
|
||||
using Oqtane.Shared;
|
||||
using System;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class SiteService : ServiceBase, ISiteService
|
||||
{
|
||||
|
||||
|
|
|
@ -4,9 +4,11 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class SiteTemplateService : ServiceBase, ISiteTemplateService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -2,9 +2,11 @@ using Oqtane.Models;
|
|||
using Oqtane.Shared;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class SqlService : ServiceBase, ISqlService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class SystemService : ServiceBase, ISystemService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Net.Http;
|
|||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class TenantService : ServiceBase, ITenantService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -2,11 +2,13 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class ThemeService : ServiceBase, IThemeService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -2,10 +2,12 @@ using Oqtane.Models;
|
|||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class UserRoleService : ServiceBase, IUserRoleService
|
||||
{
|
||||
|
||||
|
|
|
@ -2,9 +2,11 @@ using Oqtane.Shared;
|
|||
using Oqtane.Models;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||
public class UserService : ServiceBase, IUserService
|
||||
{
|
||||
private readonly SiteState _siteState;
|
||||
|
|
|
@ -1,12 +1,30 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Basic create/edit information - used in many objects.
|
||||
/// </summary>
|
||||
public interface IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// Username of the creator of this Object.
|
||||
/// </summary>
|
||||
string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Created Timestamp for this Object.
|
||||
/// </summary>
|
||||
DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Username of the last user who modified this Object.
|
||||
/// </summary>
|
||||
string ModifiedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Modified Timestamp for this Object.
|
||||
/// </summary>
|
||||
DateTime ModifiedOn { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,25 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Audit information for things than can be deleted.
|
||||
/// </summary>
|
||||
public interface IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="User"/> who deleted this object.
|
||||
/// </summary>
|
||||
string DeletedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp when it was deleted.
|
||||
/// </summary>
|
||||
DateTime? DeletedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If something is deleted, this will be true.
|
||||
/// </summary>
|
||||
bool IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -6,10 +6,29 @@ namespace Oqtane.Modules
|
|||
{
|
||||
public interface IModuleControl
|
||||
{
|
||||
SecurityAccessLevel SecurityAccessLevel { get; } // defines the security access level for this control - defaults to View
|
||||
string Title { get; } // title to display for this control - defaults to module title
|
||||
string Actions { get; } // allows for routing by configuration rather than by convention ( comma delimited ) - defaults to using component file name
|
||||
bool UseAdminContainer { get; } // container for embedding module control - defaults to true. false will suppress the default modal UI popup behavior and render the component in the page.
|
||||
List<Resource> Resources { get; } // identifies all resources in a module
|
||||
/// <summary>
|
||||
/// Defines the security access level for this control - defaults to View
|
||||
/// </summary>
|
||||
SecurityAccessLevel SecurityAccessLevel { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Title to display for this control - defaults to module title
|
||||
/// </summary>
|
||||
string Title { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Allows for routing by configuration rather than by convention ( comma delimited ) - defaults to using component file name
|
||||
/// </summary>
|
||||
string Actions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Container for embedding module control - defaults to true. false will suppress the default modal UI popup behavior and render the component in the page.
|
||||
/// </summary>
|
||||
bool UseAdminContainer { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Identifies all resources in a module
|
||||
/// </summary>
|
||||
List<Resource> Resources { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
namespace Oqtane.Modules
|
||||
namespace Oqtane.Modules
|
||||
{
|
||||
/// <summary>
|
||||
/// Empty interface used to decorate module services for auto registration
|
||||
/// </summary>
|
||||
public interface IService
|
||||
{
|
||||
// empty interface used to decorate module services for auto registration
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,28 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Oqtane.Themes
|
||||
{
|
||||
public interface IThemeControl
|
||||
{
|
||||
string Name { get; } // friendly name for a theme
|
||||
string Thumbnail { get; } // screen shot of a theme - assumed to be in the ThemePath() folder
|
||||
string Panes { get; } // identifies all panes in a theme ( delimited by "," or ";") - assumed to be a layout if no panes specified
|
||||
List<Resource> Resources { get; } // identifies all resources in a theme
|
||||
/// <summary>
|
||||
/// Friendly name for a theme
|
||||
/// </summary>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Screen shot of a theme - assumed to be in the ThemePath() folder
|
||||
/// </summary>
|
||||
string Thumbnail { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Identifies all panes in a theme ( delimited by "," or ";") - assumed to be a layout if no panes specified
|
||||
/// </summary>
|
||||
string Panes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Identifies all resources in a theme
|
||||
/// </summary>
|
||||
List<Resource> Resources { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,65 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// An Alias maps a url like `oqtane.my` or `oqtane.my/products` to a <see cref="Oqtane.Models.Site"/> and <see cref="Oqtane.Models.Tenant"/>
|
||||
/// </summary>
|
||||
public class Alias : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// The primary ID for internal use. It's also used in API calls to identify the site.
|
||||
/// </summary>
|
||||
public int AliasId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Alias Name = URL.
|
||||
/// The Name contains the entire path - so it can be `oqtane.me`, `www.oqtane.me` or `oqtane.me/products`
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Tenant this Alias (and the Site) references.
|
||||
/// It's important, as anything related to the Alias must be requested from a database, which is found by the Tenant it's in.
|
||||
/// </summary>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Site this Alias references.
|
||||
/// </summary>
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string ModifiedBy { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// todoc - unclear what this is for
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public DateTime SyncDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// todoc - unclear what this is for
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public List<SyncEvent> SyncEvents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The path contains the url-part after the first slash.
|
||||
/// * If the Name is `oqtane.me` the Path is empty
|
||||
/// * if the Name is `oqtane.me/products` the Path is `products`
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public string Path
|
||||
{
|
||||
|
|
|
@ -1,25 +1,82 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a File in Oqtane
|
||||
/// </summary>
|
||||
public class File : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// ID to identify the file
|
||||
/// </summary>
|
||||
public int FileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Folder"/>.
|
||||
/// Use this if you need to determine what <see cref="Site"/> the file belongs to.
|
||||
/// </summary>
|
||||
public int FolderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the file
|
||||
/// todo: with extension or not?
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File name extension like 'jpg'
|
||||
/// * Always lower case
|
||||
/// * Without the dot (.)
|
||||
/// </summary>
|
||||
public string Extension { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File size
|
||||
/// </summary>
|
||||
public int Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The height of an image (if the file is an image) in pixels.
|
||||
/// This is calculated at time of Upload, so if the file is manually replaced, the value will be wrong.
|
||||
/// </summary>
|
||||
public int ImageHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The width of an image (if the file is an image) in pixels.
|
||||
/// This is calculated at time of Upload, so if the file is manually replaced, the value will be wrong.
|
||||
/// </summary>
|
||||
public int ImageWidth { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc />
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string ModifiedBy { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Object reference to the <see cref="Folder"/> object.
|
||||
/// Use this if you need to determine what <see cref="Site"/> the file belongs to.
|
||||
/// TODO: not sure if this is always populated, must verify and document
|
||||
/// </summary>
|
||||
public Folder Folder { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,30 +1,89 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a Folder in Oqtane
|
||||
/// </summary>
|
||||
public class Folder : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// ID to identify the folder
|
||||
/// </summary>
|
||||
public int FolderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Site"/>.
|
||||
/// </summary>
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the parent <see cref="Folder"/>, if it has a parent folder.
|
||||
/// </summary>
|
||||
public int? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Folder name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path to the folder
|
||||
/// TODO: document from where the path starts
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sorting order of the folder
|
||||
/// </summary>
|
||||
public int Order { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TODO: unclear what this is for
|
||||
/// </summary>
|
||||
public bool IsSystem { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc />
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string ModifiedBy { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// TODO: todoc what would this contain?
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public string Permissions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Folder Depth
|
||||
/// TODO: todoc Where does this start, so Depth 0 or 1 is where in the file system?
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information if this folder has sub-items like more <see cref="Folder"/> or <see cref="File"/> objects
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool HasChildren { get; set; }
|
||||
}
|
||||
|
|
|
@ -2,24 +2,52 @@ using System;
|
|||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Language Information for <see cref="Site"/>s
|
||||
/// TODO: todoc - unclear how this is different from <see cref="Culture"/>
|
||||
/// </summary>
|
||||
public class Language : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID
|
||||
/// </summary>
|
||||
public int LanguageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a <see cref="Site"/>
|
||||
/// TODO: todoc - unclear why it's nullable
|
||||
/// </summary>
|
||||
public int? SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Language Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Language / Culture code, like 'en-US'
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Is this the default language on a <see cref="Site"/>
|
||||
/// </summary>
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,69 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// A log entry in the events log.
|
||||
/// </summary>
|
||||
public class Log
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID
|
||||
/// </summary>
|
||||
public int LogId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Site"/>
|
||||
/// </summary>
|
||||
public int? SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp
|
||||
/// </summary>
|
||||
public DateTime LogDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Page"/>
|
||||
/// </summary>
|
||||
public int? PageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Module"/>
|
||||
/// </summary>
|
||||
public int? ModuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="User"/>
|
||||
/// </summary>
|
||||
public int? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Url if relevant for this log entry.
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the server that created this entry
|
||||
/// </summary>
|
||||
public string Server { get; set; }
|
||||
public string Category { get; set; } // usually the full typename of the
|
||||
public string Feature { get; set; }
|
||||
public string Function { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Log level / severity
|
||||
/// </summary>
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Log Message
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
public string MessageTemplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information about raised Exceptions
|
||||
/// </summary>
|
||||
public string Exception { get; set; }
|
||||
public string Properties { get; set; }
|
||||
}
|
||||
|
|
|
@ -5,38 +5,75 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a Module _Instance_ which will be shown on a page. This is different from a <see cref="ModuleDefinition"/> which describes a Module.
|
||||
/// </summary>
|
||||
public class Module : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of this instance
|
||||
/// </summary>
|
||||
public int ModuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Site"/>
|
||||
/// </summary>
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="ModuleDefinition"/>
|
||||
/// </summary>
|
||||
public string ModuleDefinitionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines if this Module Instance should be shown on all pages of the current <see cref="Site"/>
|
||||
/// </summary>
|
||||
public bool AllPages { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
|
||||
|
||||
[NotMapped]
|
||||
public string DeletedBy { get; set; }
|
||||
[NotMapped]
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
[NotMapped]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
[NotMapped]
|
||||
public string Permissions { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Dictionary<string, string> Settings { get; set; }
|
||||
|
||||
// PageModule properties
|
||||
#region PageModule properties
|
||||
[NotMapped]
|
||||
public int PageModuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Page"/> this module is on.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int PageId { get; set; }
|
||||
[NotMapped]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Pane this module is shown in.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public string Pane { get; set; }
|
||||
[NotMapped]
|
||||
|
@ -44,7 +81,10 @@ namespace Oqtane.Models
|
|||
[NotMapped]
|
||||
public string ContainerType { get; set; }
|
||||
|
||||
// SiteRouter properties
|
||||
#endregion
|
||||
|
||||
#region SiteRouter properties
|
||||
|
||||
[NotMapped]
|
||||
public string ModuleType { get; set; }
|
||||
[NotMapped]
|
||||
|
@ -52,11 +92,20 @@ namespace Oqtane.Models
|
|||
[NotMapped]
|
||||
public int PaneModuleCount { get; set; }
|
||||
|
||||
// ModuleDefinition
|
||||
#endregion
|
||||
|
||||
#region ModuleDefinition
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="ModuleDefinition"/> used for this module.
|
||||
/// TODO: todoc - unclear if this is always populated
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public ModuleDefinition ModuleDefinition { get; set; }
|
||||
|
||||
// IModuleControl properties
|
||||
#endregion
|
||||
|
||||
#region IModuleControl properties
|
||||
// TODO: unclear why these are IModuleControl properties - there is no such interface
|
||||
[NotMapped]
|
||||
public SecurityAccessLevel SecurityAccessLevel { get; set; }
|
||||
[NotMapped]
|
||||
|
@ -65,5 +114,7 @@ namespace Oqtane.Models
|
|||
public string Actions { get; set; }
|
||||
[NotMapped]
|
||||
public bool UseAdminContainer { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Oqtane.Documentation;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a Module type (Definition) in Oqtane.
|
||||
/// The available Modules are determined at StartUp.
|
||||
/// </summary>
|
||||
public class ModuleDefinition : IAuditable
|
||||
{
|
||||
[PrivateApi("The constructor is probably just for internal use and shouldn't appear in the docs")]
|
||||
public ModuleDefinition()
|
||||
{
|
||||
Name = "";
|
||||
|
@ -26,18 +32,41 @@ namespace Oqtane.Models
|
|||
Template = "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="ModuleDefinition"/>.
|
||||
/// </summary>
|
||||
public int ModuleDefinitionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the <see cref="ModuleDefinition"/>
|
||||
/// </summary>
|
||||
public string ModuleDefinitionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Nice name to show in admin / edit dialogs.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Module description for admin dialogs.
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
public string Categories { get; set; }
|
||||
public string Version { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
// additional IModule properties
|
||||
[NotMapped]
|
||||
public string Owner { get; set; }
|
||||
|
|
|
@ -4,33 +4,103 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a Page in Oqtane
|
||||
/// </summary>
|
||||
public class Page : IAuditable, IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the Page
|
||||
/// </summary>
|
||||
public int PageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Site"/>.
|
||||
/// </summary>
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the parent <see cref="Page"/> if it has one.
|
||||
/// </summary>
|
||||
public int? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Page Name.
|
||||
/// TODO: todoc where this is used
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Page Title which is shown in the browser tab.
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path of the page.
|
||||
/// TODO: todoc relative to what? site root, parent-page, domain?
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sort order in the list of other sibling pages
|
||||
/// </summary>
|
||||
public int Order { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Full URL to this page.
|
||||
/// TODO: verify that this is the case - does it contain domain etc. or just from domain or alias root?
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a <see cref="Theme"/> which will be used to show this page.
|
||||
/// </summary>
|
||||
public string ThemeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a Container which will be used for modules on this page.
|
||||
/// </summary>
|
||||
public string DefaultContainerType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Icon file for this page.
|
||||
/// TODO: unclear what this is for, and what icon library is used. Probably FontAwesome?
|
||||
/// </summary>
|
||||
public string Icon { get; set; }
|
||||
public bool IsNavigation { get; set; }
|
||||
public int? UserId { get; set; }
|
||||
public bool IsPersonalizable { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// List of Pane-names which this Page has.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public List<string> Panes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of <see cref="Resource"/> (CSS, JS) which this page needs to render properly.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public List<Resource> Resources { get; set; }
|
||||
[NotMapped]
|
||||
|
@ -39,9 +109,15 @@ namespace Oqtane.Models
|
|||
public Dictionary<string, string> Settings { get; set; }
|
||||
[NotMapped]
|
||||
public int Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines if there are sub-pages. True if this page has sub-pages.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool HasChildren { get; set; }
|
||||
|
||||
#region Deprecated Properties
|
||||
|
||||
[Obsolete("This property is deprecated", false)]
|
||||
[NotMapped]
|
||||
public bool EditMode { get; set; }
|
||||
|
@ -50,5 +126,6 @@ namespace Oqtane.Models
|
|||
[NotMapped]
|
||||
public string LayoutType { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,72 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about a <see cref="Module"/> instance on a <see cref="Page"/>
|
||||
/// </summary>
|
||||
public class PageModule : IAuditable, IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID to identify this instance.
|
||||
/// </summary>
|
||||
public int PageModuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Page"/>.
|
||||
/// </summary>
|
||||
public int PageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Module"/>.
|
||||
/// </summary>
|
||||
public int ModuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Module title. Will be shown in the Container if the container shows titles.
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Pane which this module instance appears.
|
||||
/// </summary>
|
||||
public string Pane { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The sorting order / position in the Pane where this module appears.
|
||||
/// </summary>
|
||||
public int Order { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a Razor Container which wraps this module instance.
|
||||
/// </summary>
|
||||
public string ContainerType { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Module"/> itself.
|
||||
/// TODO: todoc - unclear if this is always populated
|
||||
/// </summary>
|
||||
public Module Module { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,49 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a Security Role in Oqtane.
|
||||
/// </summary>
|
||||
public class Role : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// Primary ID
|
||||
/// </summary>
|
||||
public int RoleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a <see cref="Site"/> if applicable.
|
||||
/// </summary>
|
||||
public int? SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Role name to show in Admin dialogs.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Brief description for Admin dialogs.
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines if users automatically get assigned to this role.
|
||||
/// </summary>
|
||||
public bool IsAutoAssigned { get; set; }
|
||||
public bool IsSystem { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,48 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// A setting for any kind of object like <see cref="Tenant"/>, <see cref="Site"/>, <see cref="Page"/>, <see cref="Module"/> etc.
|
||||
/// </summary>
|
||||
public class Setting : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the Database - mainly used to later update an existing setting.
|
||||
/// </summary>
|
||||
public int SettingId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// What kind of entity the setting is for, like `Page`, `Site` etc.
|
||||
/// </summary>
|
||||
public string EntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id of the Entity we're describing - so it could be `Site` number 2
|
||||
/// </summary>
|
||||
public int EntityId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the setting.
|
||||
/// </summary>
|
||||
public string SettingName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The value of this Setting. It's always a string, so make sure to convert/cast as needed.
|
||||
/// </summary>
|
||||
public string SettingValue { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,30 +3,81 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a Site in a <see cref="Tenant"/> in an Oqtane installation.
|
||||
/// Sites can have multiple <see cref="Alias"/>es.
|
||||
/// </summary>
|
||||
public class Site : IAuditable, IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID, not to be confused with the <see cref="Alias.AliasId"/>
|
||||
/// </summary>
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Tenant"/> the Site is in
|
||||
/// </summary>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The site Name
|
||||
/// TODO: todoc where this will be used / shown
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a <see cref="File"/> which has the Logo for this site.
|
||||
/// Should be an image.
|
||||
/// The theme can then use this where needed.
|
||||
/// </summary>
|
||||
public int? LogoFileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a <see cref="File"/> which has the FavIcon for this site.
|
||||
/// Should be an image.
|
||||
/// The theme can then use this where needed.
|
||||
/// TODO: todoc does this get applied automatically, or does the Theme do this?
|
||||
/// </summary>
|
||||
public int? FaviconFileId { get; set; }
|
||||
|
||||
public string DefaultThemeType { get; set; }
|
||||
public string DefaultContainerType { get; set; }
|
||||
public string AdminContainerType { get; set; }
|
||||
public bool PwaIsEnabled { get; set; }
|
||||
public int? PwaAppIconFileId { get; set; }
|
||||
public int? PwaSplashIconFileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines if users may register / create accounts
|
||||
/// </summary>
|
||||
public bool AllowRegistration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique GUID to identify the Site.
|
||||
/// </summary>
|
||||
public string SiteGuid { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
[NotMapped]
|
||||
public string SiteTemplateType { get; set; }
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class SqlQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Tenant"/> this belongs to
|
||||
/// </summary>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
public string Query { get; set; }
|
||||
public List<Dictionary<string, string>> Results { get; set; }
|
||||
}
|
||||
|
|
|
@ -1,17 +1,48 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a Tenant in Oqtane.
|
||||
/// Tenants can contain multiple <see cref="Site"/>s and have all their data in a separate Database.
|
||||
/// </summary>
|
||||
public class Tenant : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// ID of the Tenant.
|
||||
/// </summary>
|
||||
public int TenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the Tenant to show in Tenant lists.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Connection string to access this Tenant DB.
|
||||
/// </summary>
|
||||
public string DBConnectionString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Type of DB used in this Tenant
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// New in v2.1.0
|
||||
/// </remarks>
|
||||
public string DBType { get; set; }
|
||||
public string Version { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace Oqtane.Models
|
|||
public List<ThemeControl> Containers { get; set; }
|
||||
public string Template { get; set; }
|
||||
|
||||
#region Obsolete Properties
|
||||
|
||||
[Obsolete("This property is obsolete. Use Themes instead.", false)]
|
||||
public string ThemeControls { get; set; }
|
||||
[Obsolete("This property is obsolete. Use Layouts instead.", false)]
|
||||
|
@ -42,5 +44,8 @@ namespace Oqtane.Models
|
|||
public string ContainerControls { get; set; }
|
||||
[Obsolete("This property is obsolete.", false)]
|
||||
public List<ThemeControl> Layouts { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +1,91 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a User in Oqtane.
|
||||
/// </summary>
|
||||
public class User : IAuditable, IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// ID of this User.
|
||||
/// </summary>
|
||||
public int UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Username used for login.
|
||||
/// </summary>
|
||||
public string Username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name shown in menus / dialogs etc.
|
||||
/// </summary>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User E-Mail address.
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to a <see cref="File"/> containing the users photo.
|
||||
/// </summary>
|
||||
public int? PhotoFileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp of last login.
|
||||
/// </summary>
|
||||
public DateTime? LastLoginOn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Tracking information of IP used when the user last worked on this site.
|
||||
/// </summary>
|
||||
public string LastIPAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Site"/> this user belongs to.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Role names this user has.
|
||||
/// TODO: todoc - is this comma separated?
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public string Roles { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// The users password. Note that this is not plaintext, so you can probably never really work with this.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information if this user is authenticated. Anonymous users are not authenticated.
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool IsAuthenticated { get; set; }
|
||||
}
|
||||
|
|
|
@ -1,22 +1,59 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Assigns a <see cref="Role"/> to a <see cref="User"/>
|
||||
/// </summary>
|
||||
public class UserRole : IAuditable
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of this assignment
|
||||
/// </summary>
|
||||
public int UserRoleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="User"/> who receives this <see cref="Role"/> assignment.
|
||||
/// </summary>
|
||||
public int UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the <see cref="Role"/> which the <see cref="User"/> receives
|
||||
/// </summary>
|
||||
public int RoleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Start of when this assignment is valid. See also <see cref="ExpiryDate"/>
|
||||
/// </summary>
|
||||
public DateTime? EffectiveDate { get; set; }
|
||||
/// <summary>
|
||||
/// End of when this assignment is valid. See also <see cref="EffectiveDate"/>
|
||||
/// </summary>
|
||||
public DateTime? ExpiryDate { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CreatedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime CreatedOn { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string ModifiedBy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Direct reference to the <see cref="Role"/> object.
|
||||
/// TODO: todoc - is this always populated?
|
||||
/// </summary>
|
||||
public Role Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Direct reference to the <see cref="User"/> object.
|
||||
/// TODO: todoc - is this always populated?
|
||||
/// </summary>
|
||||
public User User { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user