diff --git a/Oqtane.Client/Oqtane.Client.csproj.DotSettings b/Oqtane.Client/Oqtane.Client.csproj.DotSettings
new file mode 100644
index 00000000..a2222887
--- /dev/null
+++ b/Oqtane.Client/Oqtane.Client.csproj.DotSettings
@@ -0,0 +1,2 @@
+
+ True
\ No newline at end of file
diff --git a/Oqtane.Client/Services/AliasService.cs b/Oqtane.Client/Services/AliasService.cs
index 55aee8c9..5a72e4bb 100644
--- a/Oqtane.Client/Services/AliasService.cs
+++ b/Oqtane.Client/Services/AliasService.cs
@@ -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
{
+ ///
+ [PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class AliasService : ServiceBase, IAliasService
{
private readonly SiteState _siteState;
+ ///
+ /// Constructor - should only be used by Dependency Injection
+ ///
public AliasService(HttpClient http, SiteState siteState) : base(http)
{
_siteState = siteState;
@@ -21,32 +27,38 @@ namespace Oqtane.Services
private string ApiUrl => CreateApiUrl("Alias", _siteState.Alias);
+ ///
public async Task> GetAliasesAsync()
{
List aliases = await GetJsonAsync>(ApiUrl);
return aliases.OrderBy(item => item.Name).ToList();
}
+ ///
public async Task GetAliasAsync(int aliasId)
{
return await GetJsonAsync($"{ApiUrl}/{aliasId}");
}
+ ///
public async Task GetAliasAsync(string path, DateTime lastSyncDate)
{
// tenant agnostic as SiteState does not exist
return await GetJsonAsync($"{CreateApiUrl("Alias", null)}/name/?path={WebUtility.UrlEncode(path)}&sync={lastSyncDate.ToString("yyyyMMddHHmmssfff")}");
}
+ ///
public async Task AddAliasAsync(Alias alias)
{
return await PostJsonAsync(ApiUrl, alias);
}
+ ///
public async Task UpdateAliasAsync(Alias alias)
{
return await PutJsonAsync($"{ApiUrl}/{alias.AliasId}", alias);
}
+ ///
public async Task DeleteAliasAsync(int aliasId)
{
await DeleteAsync($"{ApiUrl}/{aliasId}");
diff --git a/Oqtane.Client/Services/DatabaseService.cs b/Oqtane.Client/Services/DatabaseService.cs
index db108d74..5f9aa925 100644
--- a/Oqtane.Client/Services/DatabaseService.cs
+++ b/Oqtane.Client/Services/DatabaseService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/FileService.cs b/Oqtane.Client/Services/FileService.cs
index 3bcf4b20..9848e792 100644
--- a/Oqtane.Client/Services/FileService.cs
+++ b/Oqtane.Client/Services/FileService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/FolderService.cs b/Oqtane.Client/Services/FolderService.cs
index ffb05c8e..653fab23 100644
--- a/Oqtane.Client/Services/FolderService.cs
+++ b/Oqtane.Client/Services/FolderService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/InstallationService.cs b/Oqtane.Client/Services/InstallationService.cs
index 0874ed42..6b63ba60 100644
--- a/Oqtane.Client/Services/InstallationService.cs
+++ b/Oqtane.Client/Services/InstallationService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/Interfaces/IAliasService.cs b/Oqtane.Client/Services/Interfaces/IAliasService.cs
index f15356f1..89c25605 100644
--- a/Oqtane.Client/Services/Interfaces/IAliasService.cs
+++ b/Oqtane.Client/Services/Interfaces/IAliasService.cs
@@ -1,22 +1,55 @@
-using Oqtane.Models;
+using Oqtane.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Oqtane.Services
{
+ ///
+ /// Retrieve and store information.
+ ///
public interface IAliasService
{
+ ///
+ /// Get all aliases in the system
+ ///
+ ///
Task> GetAliasesAsync();
+ ///
+ /// Get a single alias
+ ///
+ /// The ID, not to be confused with a ID
+ ///
Task GetAliasAsync(int aliasId);
+ ///
+ /// Retrieve the Alias object of a URL.
+ ///
+ /// The URL - todoc - is this only the root, or can it be a longer path?
+ /// todoc - unclear what this is for
+ ///
Task GetAliasAsync(string url, DateTime lastSyncDate);
+ ///
+ /// Save another in the DB. It must already contain all the information incl. it belongs to.
+ ///
+ /// An to add.
+ ///
Task AddAliasAsync(Alias alias);
+ ///
+ /// Update an in the DB. Make sure the object is correctly filled, as it must update an existing record.
+ ///
+ /// The to update.
+ ///
Task UpdateAliasAsync(Alias alias);
+ ///
+ /// Remove an from the DB.
+ ///
+ /// The Alias ID, not to be confused with a Site ID.
+ ///
Task DeleteAliasAsync(int aliasId);
}
}
diff --git a/Oqtane.Client/Services/Interfaces/IFileService.cs b/Oqtane.Client/Services/Interfaces/IFileService.cs
index 7e10f4fd..ba6a88e1 100644
--- a/Oqtane.Client/Services/Interfaces/IFileService.cs
+++ b/Oqtane.Client/Services/Interfaces/IFileService.cs
@@ -1,4 +1,4 @@
-using Oqtane.Models;
+using Oqtane.Models;
using System.Collections.Generic;
using System.Threading.Tasks;
diff --git a/Oqtane.Client/Services/JobLogService.cs b/Oqtane.Client/Services/JobLogService.cs
index 260d77eb..6d9a3e56 100644
--- a/Oqtane.Client/Services/JobLogService.cs
+++ b/Oqtane.Client/Services/JobLogService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/JobService.cs b/Oqtane.Client/Services/JobService.cs
index 40a23339..f4fdc281 100644
--- a/Oqtane.Client/Services/JobService.cs
+++ b/Oqtane.Client/Services/JobService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/LanguageService.cs b/Oqtane.Client/Services/LanguageService.cs
index 77286be5..dc8ff89b 100644
--- a/Oqtane.Client/Services/LanguageService.cs
+++ b/Oqtane.Client/Services/LanguageService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/LocalizationService.cs b/Oqtane.Client/Services/LocalizationService.cs
index 9b1b4b61..d0603997 100644
--- a/Oqtane.Client/Services/LocalizationService.cs
+++ b/Oqtane.Client/Services/LocalizationService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/LogService.cs b/Oqtane.Client/Services/LogService.cs
index 6d787341..8b158cb2 100644
--- a/Oqtane.Client/Services/LogService.cs
+++ b/Oqtane.Client/Services/LogService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/ModuleDefinitionService.cs b/Oqtane.Client/Services/ModuleDefinitionService.cs
index a097c6ff..67a6b4ca 100644
--- a/Oqtane.Client/Services/ModuleDefinitionService.cs
+++ b/Oqtane.Client/Services/ModuleDefinitionService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/ModuleService.cs b/Oqtane.Client/Services/ModuleService.cs
index 00b88a82..01ec03c5 100644
--- a/Oqtane.Client/Services/ModuleService.cs
+++ b/Oqtane.Client/Services/ModuleService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/NotificationService.cs b/Oqtane.Client/Services/NotificationService.cs
index 5bbd8606..ce710da5 100644
--- a/Oqtane.Client/Services/NotificationService.cs
+++ b/Oqtane.Client/Services/NotificationService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/PackageService.cs b/Oqtane.Client/Services/PackageService.cs
index c101b5f3..59e049f4 100644
--- a/Oqtane.Client/Services/PackageService.cs
+++ b/Oqtane.Client/Services/PackageService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/PageModuleService.cs b/Oqtane.Client/Services/PageModuleService.cs
index 63e871d4..4ed4fa1a 100644
--- a/Oqtane.Client/Services/PageModuleService.cs
+++ b/Oqtane.Client/Services/PageModuleService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/PageService.cs b/Oqtane.Client/Services/PageService.cs
index a4922d0a..a1030848 100644
--- a/Oqtane.Client/Services/PageService.cs
+++ b/Oqtane.Client/Services/PageService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/ProfileService.cs b/Oqtane.Client/Services/ProfileService.cs
index b4a80b89..e19069f7 100644
--- a/Oqtane.Client/Services/ProfileService.cs
+++ b/Oqtane.Client/Services/ProfileService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/RoleService.cs b/Oqtane.Client/Services/RoleService.cs
index 83b34d68..35bf8980 100644
--- a/Oqtane.Client/Services/RoleService.cs
+++ b/Oqtane.Client/Services/RoleService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/ServiceBase.cs b/Oqtane.Client/Services/ServiceBase.cs
index f4ca76f5..14a4fea7 100644
--- a/Oqtane.Client/Services/ServiceBase.cs
+++ b/Oqtane.Client/Services/ServiceBase.cs
@@ -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;
diff --git a/Oqtane.Client/Services/SettingService.cs b/Oqtane.Client/Services/SettingService.cs
index e252c3ea..7ac1eff3 100644
--- a/Oqtane.Client/Services/SettingService.cs
+++ b/Oqtane.Client/Services/SettingService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/SiteService.cs b/Oqtane.Client/Services/SiteService.cs
index b4116312..56ba5b16 100644
--- a/Oqtane.Client/Services/SiteService.cs
+++ b/Oqtane.Client/Services/SiteService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/SiteTemplateService.cs b/Oqtane.Client/Services/SiteTemplateService.cs
index 383fb6f6..300fa1c2 100644
--- a/Oqtane.Client/Services/SiteTemplateService.cs
+++ b/Oqtane.Client/Services/SiteTemplateService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/SqlService.cs b/Oqtane.Client/Services/SqlService.cs
index d43a8198..00319953 100644
--- a/Oqtane.Client/Services/SqlService.cs
+++ b/Oqtane.Client/Services/SqlService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/SystemService.cs b/Oqtane.Client/Services/SystemService.cs
index cade0ed0..97112ca1 100644
--- a/Oqtane.Client/Services/SystemService.cs
+++ b/Oqtane.Client/Services/SystemService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/TenantService.cs b/Oqtane.Client/Services/TenantService.cs
index f09d91d2..52b3d345 100644
--- a/Oqtane.Client/Services/TenantService.cs
+++ b/Oqtane.Client/Services/TenantService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/ThemeService.cs b/Oqtane.Client/Services/ThemeService.cs
index 529c1a3b..b36828fd 100644
--- a/Oqtane.Client/Services/ThemeService.cs
+++ b/Oqtane.Client/Services/ThemeService.cs
@@ -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;
diff --git a/Oqtane.Client/Services/UserRoleService.cs b/Oqtane.Client/Services/UserRoleService.cs
index a69eaa10..1bb35450 100644
--- a/Oqtane.Client/Services/UserRoleService.cs
+++ b/Oqtane.Client/Services/UserRoleService.cs
@@ -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
{
diff --git a/Oqtane.Client/Services/UserService.cs b/Oqtane.Client/Services/UserService.cs
index 3fb73cc5..6a981e54 100644
--- a/Oqtane.Client/Services/UserService.cs
+++ b/Oqtane.Client/Services/UserService.cs
@@ -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;
diff --git a/Oqtane.Shared/Interfaces/IAuditable.cs b/Oqtane.Shared/Interfaces/IAuditable.cs
index 83cd1c1f..7e8c5dce 100644
--- a/Oqtane.Shared/Interfaces/IAuditable.cs
+++ b/Oqtane.Shared/Interfaces/IAuditable.cs
@@ -1,12 +1,30 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// Basic create/edit information - used in many objects.
+ ///
public interface IAuditable
{
+ ///
+ /// Username of the creator of this Object.
+ ///
string CreatedBy { get; set; }
+
+ ///
+ /// Created Timestamp for this Object.
+ ///
DateTime CreatedOn { get; set; }
+
+ ///
+ /// Username of the last user who modified this Object.
+ ///
string ModifiedBy { get; set; }
+
+ ///
+ /// Modified Timestamp for this Object.
+ ///
DateTime ModifiedOn { get; set; }
}
}
diff --git a/Oqtane.Shared/Interfaces/IDeletable.cs b/Oqtane.Shared/Interfaces/IDeletable.cs
index 7880f8ff..1f155224 100644
--- a/Oqtane.Shared/Interfaces/IDeletable.cs
+++ b/Oqtane.Shared/Interfaces/IDeletable.cs
@@ -1,11 +1,25 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// Audit information for things than can be deleted.
+ ///
public interface IDeletable
{
+ ///
+ /// who deleted this object.
+ ///
string DeletedBy { get; set; }
+
+ ///
+ /// Timestamp when it was deleted.
+ ///
DateTime? DeletedOn { get; set; }
+
+ ///
+ /// If something is deleted, this will be true.
+ ///
bool IsDeleted { get; set; }
}
}
diff --git a/Oqtane.Shared/Interfaces/IModuleControl.cs b/Oqtane.Shared/Interfaces/IModuleControl.cs
index 1002bd2d..7d9dd5c7 100644
--- a/Oqtane.Shared/Interfaces/IModuleControl.cs
+++ b/Oqtane.Shared/Interfaces/IModuleControl.cs
@@ -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 Resources { get; } // identifies all resources in a module
+ ///
+ /// Defines the security access level for this control - defaults to View
+ ///
+ SecurityAccessLevel SecurityAccessLevel { get; }
+
+ ///
+ /// Title to display for this control - defaults to module title
+ ///
+ string Title { get; }
+
+ ///
+ /// Allows for routing by configuration rather than by convention ( comma delimited ) - defaults to using component file name
+ ///
+ string Actions { 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.
+ ///
+ bool UseAdminContainer { get; }
+
+ ///
+ /// Identifies all resources in a module
+ ///
+ List Resources { get; }
}
}
diff --git a/Oqtane.Shared/Interfaces/IService.cs b/Oqtane.Shared/Interfaces/IService.cs
index b7330d81..ff30723a 100644
--- a/Oqtane.Shared/Interfaces/IService.cs
+++ b/Oqtane.Shared/Interfaces/IService.cs
@@ -1,7 +1,9 @@
-namespace Oqtane.Modules
+namespace Oqtane.Modules
{
+ ///
+ /// Empty interface used to decorate module services for auto registration
+ ///
public interface IService
{
- // empty interface used to decorate module services for auto registration
}
}
diff --git a/Oqtane.Shared/Interfaces/IThemeControl.cs b/Oqtane.Shared/Interfaces/IThemeControl.cs
index f147afba..ef5d9bc2 100644
--- a/Oqtane.Shared/Interfaces/IThemeControl.cs
+++ b/Oqtane.Shared/Interfaces/IThemeControl.cs
@@ -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 Resources { get; } // identifies all resources in a theme
+ ///
+ /// Friendly name for a theme
+ ///
+ string Name { get; }
+
+ ///
+ /// Screen shot of a theme - assumed to be in the ThemePath() folder
+ ///
+ string Thumbnail { get; }
+
+ ///
+ /// Identifies all panes in a theme ( delimited by "," or ";") - assumed to be a layout if no panes specified
+ ///
+ string Panes { get; }
+
+ ///
+ /// Identifies all resources in a theme
+ ///
+ List Resources { get; }
}
}
diff --git a/Oqtane.Shared/Models/Alias.cs b/Oqtane.Shared/Models/Alias.cs
index 5e54e382..94c340c5 100644
--- a/Oqtane.Shared/Models/Alias.cs
+++ b/Oqtane.Shared/Models/Alias.cs
@@ -1,26 +1,65 @@
-using System;
+using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
+ ///
+ /// An Alias maps a url like `oqtane.my` or `oqtane.my/products` to a and
+ ///
public class Alias : IAuditable
{
+ ///
+ /// The primary ID for internal use. It's also used in API calls to identify the site.
+ ///
public int AliasId { get; set; }
+
+ ///
+ /// The Alias Name = URL.
+ /// The Name contains the entire path - so it can be `oqtane.me`, `www.oqtane.me` or `oqtane.me/products`
+ ///
public string Name { get; set; }
+
+ ///
+ /// 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.
+ ///
public int TenantId { get; set; }
+
+ ///
+ /// The Site this Alias references.
+ ///
public int SiteId { get; set; }
+ ///
public string CreatedBy { get; set; }
+
+ ///
public DateTime CreatedOn { get; set; }
+
+ ///
public string ModifiedBy { get; set; }
+
+ ///
public DateTime ModifiedOn { get; set; }
+ ///
+ /// todoc - unclear what this is for
+ ///
[NotMapped]
public DateTime SyncDate { get; set; }
+
+ ///
+ /// todoc - unclear what this is for
+ ///
[NotMapped]
public List SyncEvents { get; set; }
+ ///
+ /// 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`
+ ///
[NotMapped]
public string Path
{
diff --git a/Oqtane.Shared/Models/File.cs b/Oqtane.Shared/Models/File.cs
index ae20fa11..f09f05d9 100644
--- a/Oqtane.Shared/Models/File.cs
+++ b/Oqtane.Shared/Models/File.cs
@@ -1,25 +1,82 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// Describes a File in Oqtane
+ ///
public class File : IAuditable
{
+ ///
+ /// ID to identify the file
+ ///
public int FileId { get; set; }
+
+ ///
+ /// Reference to the .
+ /// Use this if you need to determine what the file belongs to.
+ ///
public int FolderId { get; set; }
+
+ ///
+ /// Name of the file
+ /// todo: with extension or not?
+ ///
public string Name { get; set; }
+
+ ///
+ /// File name extension like 'jpg'
+ /// * Always lower case
+ /// * Without the dot (.)
+ ///
public string Extension { get; set; }
+
+ ///
+ /// File size
+ ///
public int Size { get; set; }
+
+ ///
+ /// 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.
+ ///
public int ImageHeight { get; set; }
+
+ ///
+ /// 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.
+ ///
public int ImageWidth { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+
+ ///
public DateTime CreatedOn { get; set; }
+
+ ///
public string ModifiedBy { get; set; }
+
+ ///
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
+
+ ///
+ /// Object reference to the object.
+ /// Use this if you need to determine what the file belongs to.
+ /// TODO: not sure if this is always populated, must verify and document
+ ///
public Folder Folder { get; set; }
}
}
diff --git a/Oqtane.Shared/Models/Folder.cs b/Oqtane.Shared/Models/Folder.cs
index 5f04f4bb..f995843c 100644
--- a/Oqtane.Shared/Models/Folder.cs
+++ b/Oqtane.Shared/Models/Folder.cs
@@ -1,30 +1,89 @@
-using System;
+using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
+ ///
+ /// Describes a Folder in Oqtane
+ ///
public class Folder : IAuditable
{
+ ///
+ /// ID to identify the folder
+ ///
public int FolderId { get; set; }
+
+ ///
+ /// Reference to the .
+ ///
public int SiteId { get; set; }
+
+ ///
+ /// Reference to the parent , if it has a parent folder.
+ ///
public int? ParentId { get; set; }
+
+ ///
+ /// Folder name
+ ///
public string Name { get; set; }
+
+ ///
+ /// Path to the folder
+ /// TODO: document from where the path starts
+ ///
public string Path { get; set; }
+
+ ///
+ /// Sorting order of the folder
+ ///
public int Order { get; set; }
+
+ ///
+ /// TODO: unclear what this is for
+ ///
public bool IsSystem { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+
+ ///
public DateTime CreatedOn { get; set; }
+
+ ///
public string ModifiedBy { get; set; }
+
+ ///
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
+ ///
+ /// TODO: todoc what would this contain?
+ ///
[NotMapped]
public string Permissions { get; set; }
+
+ ///
+ /// Folder Depth
+ /// TODO: todoc Where does this start, so Depth 0 or 1 is where in the file system?
+ ///
[NotMapped]
public int Level { get; set; }
+
+ ///
+ /// Information if this folder has sub-items like more or objects
+ ///
[NotMapped]
public bool HasChildren { get; set; }
}
diff --git a/Oqtane.Shared/Models/Language.cs b/Oqtane.Shared/Models/Language.cs
index e0afdd66..ccac5210 100644
--- a/Oqtane.Shared/Models/Language.cs
+++ b/Oqtane.Shared/Models/Language.cs
@@ -2,24 +2,52 @@ using System;
namespace Oqtane.Models
{
+ ///
+ /// Language Information for s
+ /// TODO: todoc - unclear how this is different from
+ ///
public class Language : IAuditable
{
+ ///
+ /// Internal ID
+ ///
public int LanguageId { get; set; }
+ ///
+ /// Reference to a
+ /// TODO: todoc - unclear why it's nullable
+ ///
public int? SiteId { get; set; }
+ ///
+ /// Language Name
+ ///
public string Name { get; set; }
+ ///
+ /// Language / Culture code, like 'en-US'
+ ///
public string Code { get; set; }
+ ///
+ /// Is this the default language on a
+ ///
public bool IsDefault { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
public DateTime ModifiedOn { get; set; }
+
+ #endregion
}
}
diff --git a/Oqtane.Shared/Models/Log.cs b/Oqtane.Shared/Models/Log.cs
index a1ff4c16..adacfbbd 100644
--- a/Oqtane.Shared/Models/Log.cs
+++ b/Oqtane.Shared/Models/Log.cs
@@ -1,23 +1,69 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// A log entry in the events log.
+ ///
public class Log
{
+ ///
+ /// Internal ID
+ ///
public int LogId { get; set; }
+
+ ///
+ /// Reference to the
+ ///
public int? SiteId { get; set; }
+
+ ///
+ /// Timestamp
+ ///
public DateTime LogDate { get; set; }
+
+ ///
+ /// Reference to the
+ ///
public int? PageId { get; set; }
+
+ ///
+ /// Reference to the
+ ///
public int? ModuleId { get; set; }
+
+ ///
+ /// Reference to the
+ ///
public int? UserId { get; set; }
+
+ ///
+ /// Url if relevant for this log entry.
+ ///
public string Url { get; set; }
+
+ ///
+ /// Name of the server that created this entry
+ ///
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; }
+
+ ///
+ /// Log level / severity
+ ///
public string Level { get; set; }
+
+ ///
+ /// Log Message
+ ///
public string Message { get; set; }
public string MessageTemplate { get; set; }
+
+ ///
+ /// Information about raised Exceptions
+ ///
public string Exception { get; set; }
public string Properties { get; set; }
}
diff --git a/Oqtane.Shared/Models/Module.cs b/Oqtane.Shared/Models/Module.cs
index 8ceb1254..52c70d99 100644
--- a/Oqtane.Shared/Models/Module.cs
+++ b/Oqtane.Shared/Models/Module.cs
@@ -5,38 +5,75 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
+ ///
+ /// Describes a Module _Instance_ which will be shown on a page. This is different from a which describes a Module.
+ ///
public class Module : IAuditable
{
+ ///
+ /// The ID of this instance
+ ///
public int ModuleId { get; set; }
+
+ ///
+ /// Reference to the
+ ///
public int SiteId { get; set; }
+
+ ///
+ /// Reference to the
+ ///
public string ModuleDefinitionName { get; set; }
+
+ ///
+ /// Determines if this Module Instance should be shown on all pages of the current
+ ///
public bool AllPages { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
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 Settings { get; set; }
- // PageModule properties
+ #region PageModule properties
[NotMapped]
public int PageModuleId { get; set; }
+
+ ///
+ /// Reference to the this module is on.
+ ///
[NotMapped]
public int PageId { get; set; }
[NotMapped]
public string Title { get; set; }
+
+ ///
+ /// The Pane this module is shown in.
+ ///
[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
+ ///
+ /// Reference to the used for this module.
+ /// TODO: todoc - unclear if this is always populated
+ ///
[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
}
}
diff --git a/Oqtane.Shared/Models/ModuleDefinition.cs b/Oqtane.Shared/Models/ModuleDefinition.cs
index a13a342a..dbc74903 100644
--- a/Oqtane.Shared/Models/ModuleDefinition.cs
+++ b/Oqtane.Shared/Models/ModuleDefinition.cs
@@ -1,10 +1,16 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
+using Oqtane.Documentation;
namespace Oqtane.Models
{
+ ///
+ /// Describes a Module type (Definition) in Oqtane.
+ /// The available Modules are determined at StartUp.
+ ///
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 = "";
}
+ ///
+ /// Reference to the .
+ ///
public int ModuleDefinitionId { get; set; }
+
+ ///
+ /// Name of the
+ ///
public string ModuleDefinitionName { get; set; }
+
+ ///
+ /// Nice name to show in admin / edit dialogs.
+ ///
public string Name { get; set; }
+
+ ///
+ /// Module description for admin dialogs.
+ ///
public string Description { get; set; }
public string Categories { get; set; }
public string Version { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
public DateTime ModifiedOn { get; set; }
+ #endregion
+
// additional IModule properties
[NotMapped]
public string Owner { get; set; }
diff --git a/Oqtane.Shared/Models/Page.cs b/Oqtane.Shared/Models/Page.cs
index 5b553c63..08dac7d7 100644
--- a/Oqtane.Shared/Models/Page.cs
+++ b/Oqtane.Shared/Models/Page.cs
@@ -4,33 +4,103 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
+ ///
+ /// Describes a Page in Oqtane
+ ///
public class Page : IAuditable, IDeletable
{
+ ///
+ /// Id of the Page
+ ///
public int PageId { get; set; }
+
+ ///
+ /// Reference to the .
+ ///
public int SiteId { get; set; }
+
+ ///
+ /// Reference to the parent if it has one.
+ ///
public int? ParentId { get; set; }
+
+ ///
+ /// Page Name.
+ /// TODO: todoc where this is used
+ ///
public string Name { get; set; }
+
+ ///
+ /// Page Title which is shown in the browser tab.
+ ///
public string Title { get; set; }
+
+ ///
+ /// Path of the page.
+ /// TODO: todoc relative to what? site root, parent-page, domain?
+ ///
public string Path { get; set; }
+
+ ///
+ /// Sort order in the list of other sibling pages
+ ///
public int Order { get; set; }
+
+ ///
+ /// Full URL to this page.
+ /// TODO: verify that this is the case - does it contain domain etc. or just from domain or alias root?
+ ///
public string Url { get; set; }
+
+ ///
+ /// Reference to a which will be used to show this page.
+ ///
public string ThemeType { get; set; }
+
+ ///
+ /// Reference to a Container which will be used for modules on this page.
+ ///
public string DefaultContainerType { get; set; }
+
+ ///
+ /// Icon file for this page.
+ /// TODO: unclear what this is for, and what icon library is used. Probably FontAwesome?
+ ///
public string Icon { get; set; }
public bool IsNavigation { get; set; }
public int? UserId { get; set; }
public bool IsPersonalizable { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
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
+
+ ///
+ /// List of Pane-names which this Page has.
+ ///
[NotMapped]
public List Panes { get; set; }
+
+ ///
+ /// List of (CSS, JS) which this page needs to render properly.
+ ///
[NotMapped]
public List Resources { get; set; }
[NotMapped]
@@ -39,9 +109,15 @@ namespace Oqtane.Models
public Dictionary Settings { get; set; }
[NotMapped]
public int Level { get; set; }
+
+ ///
+ /// Determines if there are sub-pages. True if this page has sub-pages.
+ ///
[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
}
}
diff --git a/Oqtane.Shared/Models/PageModule.cs b/Oqtane.Shared/Models/PageModule.cs
index 7812861a..bcafcd30 100644
--- a/Oqtane.Shared/Models/PageModule.cs
+++ b/Oqtane.Shared/Models/PageModule.cs
@@ -1,26 +1,72 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// Information about a instance on a
+ ///
public class PageModule : IAuditable, IDeletable
{
+ ///
+ /// Internal ID to identify this instance.
+ ///
public int PageModuleId { get; set; }
+
+ ///
+ /// Reference to the .
+ ///
public int PageId { get; set; }
+
+ ///
+ /// Reference to the .
+ ///
public int ModuleId { get; set; }
+
+ ///
+ /// Module title. Will be shown in the Container if the container shows titles.
+ ///
public string Title { get; set; }
+
+ ///
+ /// The Pane which this module instance appears.
+ ///
public string Pane { get; set; }
+
+ ///
+ /// The sorting order / position in the Pane where this module appears.
+ ///
public int Order { get; set; }
+
+ ///
+ /// Reference to a Razor Container which wraps this module instance.
+ ///
public string ContainerType { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
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
+ ///
+ /// The itself.
+ /// TODO: todoc - unclear if this is always populated
+ ///
public Module Module { get; set; }
}
}
diff --git a/Oqtane.Shared/Models/Role.cs b/Oqtane.Shared/Models/Role.cs
index c9a316b5..1e9fc505 100644
--- a/Oqtane.Shared/Models/Role.cs
+++ b/Oqtane.Shared/Models/Role.cs
@@ -1,19 +1,49 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// Describes a Security Role in Oqtane.
+ ///
public class Role : IAuditable
{
+ ///
+ /// Primary ID
+ ///
public int RoleId { get; set; }
+
+ ///
+ /// Reference to a if applicable.
+ ///
public int? SiteId { get; set; }
+
+ ///
+ /// Role name to show in Admin dialogs.
+ ///
public string Name { get; set; }
+
+ ///
+ /// Brief description for Admin dialogs.
+ ///
public string Description { get; set; }
+
+ ///
+ /// Determines if users automatically get assigned to this role.
+ ///
public bool IsAutoAssigned { get; set; }
public bool IsSystem { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
public DateTime ModifiedOn { get; set; }
+
+ #endregion
}
}
diff --git a/Oqtane.Shared/Models/Setting.cs b/Oqtane.Shared/Models/Setting.cs
index d7742c84..5619415d 100644
--- a/Oqtane.Shared/Models/Setting.cs
+++ b/Oqtane.Shared/Models/Setting.cs
@@ -1,18 +1,48 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// A setting for any kind of object like , , , etc.
+ ///
public class Setting : IAuditable
{
+ ///
+ /// ID in the Database - mainly used to later update an existing setting.
+ ///
public int SettingId { get; set; }
+
+ ///
+ /// What kind of entity the setting is for, like `Page`, `Site` etc.
+ ///
public string EntityName { get; set; }
+
+ ///
+ /// Id of the Entity we're describing - so it could be `Site` number 2
+ ///
public int EntityId { get; set; }
+
+ ///
+ /// Name of the setting.
+ ///
public string SettingName { get; set; }
+
+ ///
+ /// The value of this Setting. It's always a string, so make sure to convert/cast as needed.
+ ///
public string SettingValue { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
public DateTime ModifiedOn { get; set; }
+
+ #endregion
}
}
diff --git a/Oqtane.Shared/Models/Site.cs b/Oqtane.Shared/Models/Site.cs
index 2ce878fc..86492571 100644
--- a/Oqtane.Shared/Models/Site.cs
+++ b/Oqtane.Shared/Models/Site.cs
@@ -3,30 +3,81 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
+ ///
+ /// Describes a Site in a in an Oqtane installation.
+ /// Sites can have multiple es.
+ ///
public class Site : IAuditable, IDeletable
{
+ ///
+ /// Internal ID, not to be confused with the
+ ///
public int SiteId { get; set; }
+
+ ///
+ /// Reference to the the Site is in
+ ///
public int TenantId { get; set; }
+
+ ///
+ /// The site Name
+ /// TODO: todoc where this will be used / shown
+ ///
public string Name { get; set; }
+
+ ///
+ /// Reference to a which has the Logo for this site.
+ /// Should be an image.
+ /// The theme can then use this where needed.
+ ///
public int? LogoFileId { get; set; }
+
+ ///
+ /// Reference to a 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?
+ ///
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; }
+
+ ///
+ /// Determines if users may register / create accounts
+ ///
public bool AllowRegistration { get; set; }
+
+ ///
+ /// Unique GUID to identify the Site.
+ ///
public string SiteGuid { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
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; }
diff --git a/Oqtane.Shared/Models/SqlQuery.cs b/Oqtane.Shared/Models/SqlQuery.cs
index 035c1178..9949d2ef 100644
--- a/Oqtane.Shared/Models/SqlQuery.cs
+++ b/Oqtane.Shared/Models/SqlQuery.cs
@@ -1,10 +1,14 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace Oqtane.Models
{
public class SqlQuery
{
+ ///
+ /// Reference to the this belongs to
+ ///
public int TenantId { get; set; }
+
public string Query { get; set; }
public List> Results { get; set; }
}
diff --git a/Oqtane.Shared/Models/Tenant.cs b/Oqtane.Shared/Models/Tenant.cs
index d0891563..72d7b0e7 100644
--- a/Oqtane.Shared/Models/Tenant.cs
+++ b/Oqtane.Shared/Models/Tenant.cs
@@ -1,17 +1,48 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// Describes a Tenant in Oqtane.
+ /// Tenants can contain multiple s and have all their data in a separate Database.
+ ///
public class Tenant : IAuditable
{
+ ///
+ /// ID of the Tenant.
+ ///
public int TenantId { get; set; }
+
+ ///
+ /// Name of the Tenant to show in Tenant lists.
+ ///
public string Name { get; set; }
+
+ ///
+ /// Connection string to access this Tenant DB.
+ ///
public string DBConnectionString { get; set; }
+
+ ///
+ /// Type of DB used in this Tenant
+ ///
+ ///
+ /// New in v2.1.0
+ ///
public string DBType { get; set; }
public string Version { get; set; }
+
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
public DateTime ModifiedOn { get; set; }
+
+ #endregion
}
}
diff --git a/Oqtane.Shared/Models/Theme.cs b/Oqtane.Shared/Models/Theme.cs
index 72abd0dd..20336047 100644
--- a/Oqtane.Shared/Models/Theme.cs
+++ b/Oqtane.Shared/Models/Theme.cs
@@ -34,6 +34,8 @@ namespace Oqtane.Models
public List 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 Layouts { get; set; }
+
+ #endregion
+
}
}
diff --git a/Oqtane.Shared/Models/User.cs b/Oqtane.Shared/Models/User.cs
index e74deef2..3a389810 100644
--- a/Oqtane.Shared/Models/User.cs
+++ b/Oqtane.Shared/Models/User.cs
@@ -1,33 +1,91 @@
-using System;
+using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
+ ///
+ /// Describes a User in Oqtane.
+ ///
public class User : IAuditable, IDeletable
{
+ ///
+ /// ID of this User.
+ ///
public int UserId { get; set; }
+
+ ///
+ /// Username used for login.
+ ///
public string Username { get; set; }
+
+ ///
+ /// Name shown in menus / dialogs etc.
+ ///
public string DisplayName { get; set; }
+
+ ///
+ /// User E-Mail address.
+ ///
public string Email { get; set; }
+
+ ///
+ /// Reference to a containing the users photo.
+ ///
public int? PhotoFileId { get; set; }
+
+ ///
+ /// Timestamp of last login.
+ ///
public DateTime? LastLoginOn { get; set; }
+
+ ///
+ /// Tracking information of IP used when the user last worked on this site.
+ ///
public string LastIPAddress { get; set; }
+ ///
+ /// Reference to the this user belongs to.
+ ///
[NotMapped]
public int SiteId { get; set; }
+
+ ///
+ /// Role names this user has.
+ /// TODO: todoc - is this comma separated?
+ ///
[NotMapped]
public string Roles { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
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
+
+ ///
+ /// The users password. Note that this is not plaintext, so you can probably never really work with this.
+ ///
[NotMapped]
public string Password { get; set; }
+
+ ///
+ /// Information if this user is authenticated. Anonymous users are not authenticated.
+ ///
[NotMapped]
public bool IsAuthenticated { get; set; }
}
diff --git a/Oqtane.Shared/Models/UserRole.cs b/Oqtane.Shared/Models/UserRole.cs
index 556a31a8..797ab43d 100644
--- a/Oqtane.Shared/Models/UserRole.cs
+++ b/Oqtane.Shared/Models/UserRole.cs
@@ -1,22 +1,59 @@
-using System;
+using System;
namespace Oqtane.Models
{
+ ///
+ /// Assigns a to a
+ ///
public class UserRole : IAuditable
{
+ ///
+ /// Id of this assignment
+ ///
public int UserRoleId { get; set; }
+
+ ///
+ /// Reference to the who receives this assignment.
+ ///
public int UserId { get; set; }
+
+ ///
+ /// Reference to the which the receives
+ ///
public int RoleId { get; set; }
+
+ ///
+ /// Start of when this assignment is valid. See also
+ ///
public DateTime? EffectiveDate { get; set; }
+ ///
+ /// End of when this assignment is valid. See also
+ ///
public DateTime? ExpiryDate { get; set; }
+ #region IAuditable Properties
+
+ ///
public string CreatedBy { get; set; }
+ ///
public DateTime CreatedOn { get; set; }
+ ///
public string ModifiedBy { get; set; }
+ ///
public DateTime ModifiedOn { get; set; }
+ #endregion
+
+ ///
+ /// Direct reference to the object.
+ /// TODO: todoc - is this always populated?
+ ///
public Role Role { get; set; }
+ ///
+ /// Direct reference to the object.
+ /// TODO: todoc - is this always populated?
+ ///
public User User { get; set; }
}
}