//
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using OnecMonitor.Server;
#nullable disable
namespace OnecMonitor.Server.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("AgentTechLogSeance", b =>
{
b.Property("ConnectedAgentsId")
.HasColumnType("TEXT");
b.Property("SeancesId")
.HasColumnType("TEXT");
b.HasKey("ConnectedAgentsId", "SeancesId");
b.HasIndex("SeancesId");
b.ToTable("AgentTechLogSeance");
});
modelBuilder.Entity("LogTemplateTechLogSeance", b =>
{
b.Property("ConnectedTemplatesId")
.HasColumnType("TEXT");
b.Property("SeancesId")
.HasColumnType("TEXT");
b.HasKey("ConnectedTemplatesId", "SeancesId");
b.HasIndex("SeancesId");
b.ToTable("LogTemplateTechLogSeance");
});
modelBuilder.Entity("OnecMonitor.Server.Models.Agent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("InstanceName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Agents");
});
modelBuilder.Entity("OnecMonitor.Server.Models.LogTemplate", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Content")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("LogTemplates");
});
modelBuilder.Entity("OnecMonitor.Server.Models.TechLogFilter", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Filter")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("TechLogFilters");
});
modelBuilder.Entity("OnecMonitor.Server.Models.TechLogSeance", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Description")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Duration")
.HasColumnType("INTEGER");
b.Property("StartDateTime")
.IsRequired()
.HasColumnType("TEXT");
b.Property("StartMode")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("TechLogSeances");
});
modelBuilder.Entity("AgentTechLogSeance", b =>
{
b.HasOne("OnecMonitor.Server.Models.Agent", null)
.WithMany()
.HasForeignKey("ConnectedAgentsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("OnecMonitor.Server.Models.TechLogSeance", null)
.WithMany()
.HasForeignKey("SeancesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("LogTemplateTechLogSeance", b =>
{
b.HasOne("OnecMonitor.Server.Models.LogTemplate", null)
.WithMany()
.HasForeignKey("ConnectedTemplatesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("OnecMonitor.Server.Models.TechLogSeance", null)
.WithMany()
.HasForeignKey("SeancesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}