| 12345678910111213141516171819202122232425262728293031323334 |
- using Microsoft.EntityFrameworkCore;
- namespace Quadarax.Application.QLiberace.Common.Entities.Base.DaoMapper
- {
- public class TrackedDm<TEntity>: IdDm<TEntity> where TEntity : QlbrcEntityTracked
- {
- public override void Map(ModelBuilder builder)
- {
- if (builder == null) throw new ArgumentNullException(nameof(builder));
- base.Map(builder);
- builder.Entity<TEntity>(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");
- }
- );
- }
- }
- }
|