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


namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
{
    public class StudyConfigration : IEntityTypeConfiguration<DicomStudy>
    {
       

        public void Configure(EntityTypeBuilder<DicomStudy> builder)
        {
        

			builder
            .HasMany(s => s.ReadingClinicalDataList)
            .WithOne(c => c.DicomStudy)
            .HasForeignKey(s => new { s.StudyId })
            .HasPrincipalKey(c => new { c.Id });

		}
    }
}
