Enhancement to support audit fields on entities

This commit is contained in:
Shaun Walker
2019-07-31 16:05:36 -04:00
parent 32a2d164c3
commit c9783c3b2f
21 changed files with 213 additions and 150 deletions

View File

@ -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; }
}
}

View 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; }
}
}

View File

@ -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; }
}
}