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

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

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

		_ = builder.Property(x => x.ObjectId)
			.HasColumnName("object_id")
			.IsRequired();

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

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

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