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

namespace GeoRitmMover.Mover.Data.EntityConfigurations;
public class PhotoMapEntityConfiguration : IEntityTypeConfiguration<PhotoMap>
{
	public void Configure(EntityTypeBuilder<PhotoMap> builder)
	{
		_ = builder.HasKey(x => x.Id);

		_ = builder.Property(x => x.From)
			.IsRequired();
		_ = builder.HasIndex(x => x.From).IsUnique();

		_ = builder.Property(x => x.To)
			.IsRequired();
		_ = builder.HasIndex(x => x.To).IsUnique();
	}
}
