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

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

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

		_ = builder.Property(x => x.GroupId)
			.HasColumnName("group_id")
			.IsRequired();

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

		_ = builder.Property(x => x.Message)
			.HasColumnName("message")
			.IsRequired();

		_ = builder.Property(x => x.IsAlarm)
			.HasColumnName("is_alarm")
			.IsRequired();
	}
}
