Enhancement to support audit fields on entities
This commit is contained in:
@ -1,14 +1,21 @@
|
||||
using System;
|
||||
using Oqtane.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Shared.Modules.HtmlText.Models
|
||||
{
|
||||
[Table("HtmlText")]
|
||||
public class HtmlTextInfo
|
||||
public class HtmlTextInfo : IAuditable
|
||||
{
|
||||
[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; }
|
||||
}
|
||||
}
|
||||
|
12
Oqtane.Shared/Models/IAuditable.cs
Normal file
12
Oqtane.Shared/Models/IAuditable.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public interface IAuditable
|
||||
{
|
||||
string CreatedBy { get; set; }
|
||||
DateTime CreatedOn { get; set; }
|
||||
string ModifiedBy { get; set; }
|
||||
DateTime ModifiedOn { get; set; }
|
||||
}
|
||||
}
|
@ -1,9 +1,16 @@
|
||||
namespace Oqtane.Models
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class Site
|
||||
public class Site : IAuditable
|
||||
{
|
||||
public int SiteId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Logo { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user