using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Integrations.Data.Configurations;
internal sealed class GeoRitmSettingsConfiguration : IEntityTypeConfiguration<GeoRitmSettings>
{
	public void Configure(EntityTypeBuilder<GeoRitmSettings> builder)
	{
		builder.Property(x => x.Port)
			.IsRequired();

		builder.HasOne(x => x.Module)
			.WithOne(x => x.GeoRitm)
			.HasForeignKey<GeoRitmSettings>(x => x.ModuleId)
			.IsRequired();
	}
}
