28 lines
600 B
C#
Raw Normal View History

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DAL.Models
{
2024-04-24 16:04:15 -05:00
public abstract class Model<TBase, TAudit>
{
[Key]
[Column("id")]
public ulong id { get; set; }
[Column("updated")]
[DataType("datetime")]
public DateTime updated { get; set; }
[Column("updater")]
public ulong updater { get; set; }
2024-04-22 17:34:27 -05:00
public User updaterRelation { get; set; } = null!;
public ICollection<TAudit> audits { get; set; } = new List<TAudit>();
public abstract TAudit adaptToAudit();
2024-04-24 16:04:15 -05:00
public abstract void updateModel(ref TBase dest);
}
}