using Microsoft.EntityFrameworkCore; using Quadarax.Application.QLiberace.Common.Entities.Base.DaoMapper; namespace Quadarax.Application.QLiberace.Base.Entities.DaoMapper { public class UserDm : TrackedDm { public override void Map(ModelBuilder builder) { if (builder == null) throw new ArgumentNullException(nameof(builder)); base.Map(builder); builder.Entity(entity => { entity.ToTable(Constants.Modules.Base.TblUser, Constants.Modules.Base.Schema); // indexes entity.HasIndex(e => e.LoginName, "IDX_TENANT_CODE") .IsUnique(); // columns entity.Property(e => e.IsLocked).IsRequired() .HasDefaultValueSql("0") .HasComment("Flag if user access locked (not accessible)"); entity.Property(e => e.LoginName).IsRequired() .HasMaxLength(100) .HasComment("User login name name. Key search value"); } ); } } }