update models to use new ModelBase
This commit is contained in:
parent
1daa9575db
commit
4499d55464
|
@ -7,7 +7,7 @@ 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
|
||||
public class Alias : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The primary ID for internal use. It's also used in API calls to identify the site.
|
||||
|
@ -36,18 +36,6 @@ namespace Oqtane.Models
|
|||
/// </summary>
|
||||
public bool IsDefault { 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>
|
||||
/// The path contains the url-part after the first slash.
|
||||
/// * If the Name is `oqtane.me` the Path is empty
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Oqtane.Models
|
|||
/// <summary>
|
||||
/// Describes a File in Oqtane
|
||||
/// </summary>
|
||||
public class File : IAuditable
|
||||
public class File : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// ID to identify the file
|
||||
|
@ -55,22 +55,6 @@ namespace Oqtane.Models
|
|||
/// </summary>
|
||||
public string Description { 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; }
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Oqtane.Models
|
|||
/// <summary>
|
||||
/// Describes a Folder in Oqtane
|
||||
/// </summary>
|
||||
public class Folder : IAuditable
|
||||
public class Folder : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// ID to identify the folder
|
||||
|
@ -59,22 +59,6 @@ namespace Oqtane.Models
|
|||
/// </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; }
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Oqtane.Models
|
|||
/// Definition of a Job / Task which is run on the server.
|
||||
/// When Jobs run, they create a <see cref="JobLog"/>
|
||||
/// </summary>
|
||||
public class Job : IAuditable
|
||||
public class Job : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID
|
||||
|
@ -68,21 +68,5 @@ namespace Oqtane.Models
|
|||
/// Todo: todoc - unsure what this does
|
||||
/// </summary>
|
||||
public int RetentionHistory { 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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Oqtane.Models
|
|||
/// Language Information for <see cref="Site"/>s
|
||||
/// TODO: todoc - unclear how this is different from <see cref="Culture"/>
|
||||
/// </summary>
|
||||
public class Language : IAuditable
|
||||
public class Language : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID
|
||||
|
@ -40,21 +40,5 @@ namespace Oqtane.Models
|
|||
/// Version of the satellite assembly
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ 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
|
||||
public class Module : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of this instance
|
||||
|
@ -30,18 +30,6 @@ namespace Oqtane.Models
|
|||
/// </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]
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace Oqtane.Models
|
|||
/// Describes a Module type (Definition) in Oqtane.
|
||||
/// The available Modules are determined at StartUp.
|
||||
/// </summary>
|
||||
public class ModuleDefinition : IAuditable
|
||||
public class ModuleDefinition : ModelBase
|
||||
{
|
||||
[PrivateApi("The constructor is probably just for internal use and shouldn't appear in the docs")]
|
||||
public ModuleDefinition()
|
||||
|
@ -63,19 +63,6 @@ namespace Oqtane.Models
|
|||
/// </summary>
|
||||
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; }
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Oqtane.Models
|
|||
/// <summary>
|
||||
/// Describes a Page in Oqtane
|
||||
/// </summary>
|
||||
public class Page : IAuditable, IDeletable
|
||||
public class Page : ModelBase, IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the Page
|
||||
|
@ -77,19 +77,6 @@ namespace Oqtane.Models
|
|||
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; }
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Oqtane.Models
|
|||
/// <summary>
|
||||
/// Information about a <see cref="Module"/> instance on a <see cref="Page"/>
|
||||
/// </summary>
|
||||
public class PageModule : IAuditable, IDeletable
|
||||
public class PageModule : ModelBase, IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID to identify this instance.
|
||||
|
@ -42,19 +42,6 @@ namespace Oqtane.Models
|
|||
/// </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; }
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Oqtane.Models
|
|||
/// Permission information for anything in Oqtane.
|
||||
/// Things in Oqtane are identified as Entities, so anything that can be identified can be described here.
|
||||
/// </summary>
|
||||
public class Permission : IAuditable
|
||||
public class Permission : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID storing this information.
|
||||
|
@ -52,22 +52,6 @@ namespace Oqtane.Models
|
|||
/// </summary>
|
||||
public bool IsAuthorized { 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>
|
||||
/// Reference to the <see cref="Role"/> based on the <see cref="RoleId"/> - can be nullable.
|
||||
/// </summary>
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Oqtane.Models
|
|||
/// A single Profile Property information of a <see cref="User"/>.
|
||||
/// So a user will have many of these to fully describe his Profile.
|
||||
/// </summary>
|
||||
public class Profile : IAuditable
|
||||
public class Profile : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID
|
||||
|
@ -68,21 +68,5 @@ namespace Oqtane.Models
|
|||
/// This gives possible values for dropdown input fields.
|
||||
/// </summary>
|
||||
public string Options { 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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Oqtane.Models
|
|||
/// <summary>
|
||||
/// Describes a Security Role in Oqtane.
|
||||
/// </summary>
|
||||
public class Role : IAuditable
|
||||
public class Role : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Primary ID
|
||||
|
@ -32,18 +32,5 @@ namespace Oqtane.Models
|
|||
/// </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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ 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
|
||||
public class Setting : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the Database - mainly used to later update an existing setting.
|
||||
|
@ -36,18 +36,5 @@ namespace Oqtane.Models
|
|||
/// Indicates if this setting is private - indicating it should be maintained on the server and not sent to the client
|
||||
/// </summary>
|
||||
public bool IsPrivate { 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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Oqtane.Models
|
|||
/// 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
|
||||
public class Tenant : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// ID of the Tenant.
|
||||
|
@ -30,19 +30,6 @@ namespace Oqtane.Models
|
|||
/// 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
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Oqtane.Models
|
|||
/// <summary>
|
||||
/// Describes a User in Oqtane.
|
||||
/// </summary>
|
||||
public class User : IAuditable, IDeletable
|
||||
public class User : ModelBase, IDeletable
|
||||
{
|
||||
/// <summary>
|
||||
/// ID of this User.
|
||||
|
@ -70,19 +70,6 @@ namespace Oqtane.Models
|
|||
/// </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
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Oqtane.Models
|
|||
/// <summary>
|
||||
/// Assigns a <see cref="Role"/> to a <see cref="User"/>
|
||||
/// </summary>
|
||||
public class UserRole : IAuditable
|
||||
public class UserRole : ModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of this assignment
|
||||
|
@ -31,19 +31,6 @@ namespace Oqtane.Models
|
|||
/// </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?
|
||||
|
|
|
@ -7,16 +7,11 @@ using Oqtane.Documentation;
|
|||
namespace Oqtane.Modules.HtmlText.Models
|
||||
{
|
||||
[PrivateApi("Mark HtmlText classes as private, since it's not very useful in the public docs")]
|
||||
public class HtmlText : IAuditable
|
||||
public class HtmlText : ModelBase
|
||||
{
|
||||
[Key]
|
||||
public int HtmlTextId { get; set; }
|
||||
public int ModuleId { get; set; }
|
||||
public string Content { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user