using Lada.Framework.Data.Domains.Finance;
using Lada.Framework.Data.Mappings;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Lada.Framework.Data.Mappings.EntityMappings.Finance
{
    /// <summary>
    /// Cấu hình FluentAPI cho VatInvoiceSyncHistory
    /// </summary>
    public class VatInvoiceSyncHistoryMap : IEntityMappingConfiguration<VatInvoiceSyncHistory>
    {
        public void Map(EntityTypeBuilder<VatInvoiceSyncHistory> builder)
        {
            builder.ToTable("VatInvoiceSyncHistories");

            // Index cho tìm kiếm nhanh
            builder.HasIndex(x => x.SyncStartTime);
            builder.HasIndex(x => x.Status);
            builder.HasIndex(x => x.SyncType);
        }
    }
}
