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

namespace GeoRitmMover.GeoRitm.Data.EntityConfigurations;
public class SourceZoneEntityConfiguration : IEntityTypeConfiguration<SourceZone>
{
	public void Configure(EntityTypeBuilder<SourceZone> builder)
	{
		_ = builder.ToTable("area_zones");

		_ = builder.HasKey(x => x.Id);
		_ = builder.Property(x => x.Id)
			.HasColumnName("id")
			.IsRequired();

		_ = builder.Property(x => x.AreaId)
			.HasColumnName("area_id")
			.IsRequired();

		_ = builder.Property(x => x.Name)
			.HasColumnName("name");

		_ = builder.Property(x => x.Num)
			.HasColumnName("num")
			.IsRequired();

		_ = builder.Property(x => x.Comment)
			.HasColumnName("comment");
	}
}
