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

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

		_ = 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.Imei)
			.HasColumnName("imei");
	}
}
