using Microsoft.EntityFrameworkCore; namespace Quadarax.Application.QLiberace.Common.Entities.Base.DaoMapper { public class TrackedDm: IdDm where TEntity : QlbrcEntityTracked { public override void Map(ModelBuilder builder) { if (builder == null) throw new ArgumentNullException(nameof(builder)); base.Map(builder); builder.Entity(entity => { entity.Property(e => e.Created).IsRequired() .HasColumnType("datetime") .HasDefaultValueSql("(getdate())") .HasComment("Record created timestamp"); entity.Property(e => e.Modified) .HasColumnType("datetime") .HasComment("Record modified timestamp"); entity.Property(e => e.Modifier) .HasMaxLength(100) .HasComment("Record modifier signature"); } ); } } }