using IRaCIS.Core.Domain.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
{


    public class TrialUserConfigration : IEntityTypeConfiguration<TrialUser>
    {


        public void Configure(EntityTypeBuilder<TrialUser> builder)
        {
            builder
             .HasMany(s => s.SiteList)
             .WithOne(c => c.TrialUser)
             .HasForeignKey(s => new { s.TrialId, s.UserId })
             .HasPrincipalKey(c => new { c.TrialId, c.UserId });

        }
    }
}
