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

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

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

		_ = builder.Property(x => x.Code)
			.HasColumnName("code")
			.IsRequired();

		_ = builder.Property(x => x.Text)
			.HasColumnName("message_text")
			.IsRequired();
	}
}
