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

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

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

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

		_ = builder.Property(x => x.ParentId)
			.HasColumnName("parent_id");
	}
}
