using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using UserModule.Core.Entities; namespace UserModule.Infrastructure.Database { public class ItemConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { // Table builder.ToTable("Users"); // Primary key builder.HasKey(x => x.Id); // BaseEntity (nếu có) builder.Property(x => x.Id) .IsRequired(); // 👉 Các field khác cấu hình khi entity đã ổn định // Ví dụ: // builder.Property(x => x.Email).IsRequired().HasMaxLength(255); // builder.HasIndex(x => x.Email).IsUnique(); } } }