Forgot unversioned xd

This commit is contained in:
gamer147
2026-05-23 14:18:18 -04:00
parent 6b70850b7b
commit bf6ddf5428
46 changed files with 43610 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace SVSim.Database.Common;
public class BaseEntity<TKey> : ITimeTrackedEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public virtual TKey Id { get; set; }
public DateTime DateCreated { get; set; } = DateTime.MinValue;
public DateTime? DateUpdated { get; set; }
}

View File

@@ -0,0 +1,8 @@
using Microsoft.EntityFrameworkCore;
namespace SVSim.Database.Common;
public interface IDataSeeder
{
void Seed(ModelBuilder builder);
}

View File

@@ -0,0 +1,14 @@
namespace SVSim.Database.Common;
public interface ITimeTrackedEntity
{
/// <summary>
/// The <see cref="DateTime"/> this entity was first added to the database.
/// </summary>
DateTime DateCreated { get; set; }
/// <summary>
/// The <see cref="DateTime"/> this entity was last updated.
/// </summary>
DateTime? DateUpdated { get; set; }
}