//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using OTSSignsOrchestrator.Core.Data;
#nullable disable
namespace OTSSignsOrchestrator.Core.Migrations
{
[DbContext(typeof(XiboContext))]
[Migration("20260218140239_AddCustomerAbbrev")]
partial class AddCustomerAbbrev
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.2");
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.CmsInstance", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CmsServerName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("Constraints")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CustomerAbbrev")
.IsRequired()
.HasMaxLength(3)
.HasColumnType("TEXT");
b.Property("CustomerName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasColumnType("TEXT");
b.Property("HostHttpPort")
.HasColumnType("INTEGER");
b.Property("LibraryHostPath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("SmtpServer")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("SmtpUsername")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("SshHostId")
.HasColumnType("TEXT");
b.Property("StackName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Status")
.HasColumnType("INTEGER");
b.Property("TemplateCacheKey")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("TemplateLastFetch")
.HasColumnType("TEXT");
b.Property("TemplateRepoPat")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("TemplateRepoUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("ThemeHostPath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("XiboApiTestStatus")
.HasColumnType("INTEGER");
b.Property("XiboApiTestedAt")
.HasColumnType("TEXT");
b.Property("XiboPassword")
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("XiboUsername")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CustomerName");
b.HasIndex("SshHostId");
b.HasIndex("StackName")
.IsUnique();
b.ToTable("CmsInstances");
});
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.OperationLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("DurationMs")
.HasColumnType("INTEGER");
b.Property("InstanceId")
.HasColumnType("TEXT");
b.Property("Message")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("Operation")
.HasColumnType("INTEGER");
b.Property("Status")
.HasColumnType("INTEGER");
b.Property("Timestamp")
.HasColumnType("TEXT");
b.Property("UserId")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("Operation");
b.HasIndex("Timestamp");
b.ToTable("OperationLogs");
});
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.SecretMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CustomerName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("IsGlobal")
.HasColumnType("INTEGER");
b.Property("LastRotatedAt")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("SecretMetadata");
});
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.SshHost", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("Host")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("KeyPassphrase")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("Label")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("LastTestSuccess")
.HasColumnType("INTEGER");
b.Property("LastTestedAt")
.HasColumnType("TEXT");
b.Property("Password")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("Port")
.HasColumnType("INTEGER");
b.Property("PrivateKeyPath")
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UseKeyAuth")
.HasColumnType("INTEGER");
b.Property("Username")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Label")
.IsUnique();
b.ToTable("SshHosts");
});
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.CmsInstance", b =>
{
b.HasOne("OTSSignsOrchestrator.Core.Models.Entities.SshHost", "SshHost")
.WithMany("Instances")
.HasForeignKey("SshHostId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("SshHost");
});
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.OperationLog", b =>
{
b.HasOne("OTSSignsOrchestrator.Core.Models.Entities.CmsInstance", "Instance")
.WithMany("OperationLogs")
.HasForeignKey("InstanceId");
b.Navigation("Instance");
});
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.CmsInstance", b =>
{
b.Navigation("OperationLogs");
});
modelBuilder.Entity("OTSSignsOrchestrator.Core.Models.Entities.SshHost", b =>
{
b.Navigation("Instances");
});
#pragma warning restore 612, 618
}
}
}