//
using System;
using CredentialManager.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace CredentialManager.Migrations
{
[DbContext(typeof(CredentialDbContext))]
[Migration("20250629181214_ReplaceRecordAssociationsWithKeyAssociations")]
partial class ReplaceRecordAssociationsWithKeyAssociations
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.6");
modelBuilder.Entity("CredentialManager.Models.CredentialEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AdditionalParameters")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("CommandTimeout")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(30);
b.Property("ConnectionString")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("DatabaseName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("DatabaseType")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("EncryptedApiKey")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("EncryptedAuthToken")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("EncryptedPassword")
.HasColumnType("TEXT");
b.Property("Headers")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("Host")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("IgnoreSslErrors")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Port")
.HasColumnType("INTEGER");
b.Property("RestServiceType")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("TimeoutSeconds")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(100);
b.Property("Type")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("Username")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("DatabaseType");
b.HasIndex("IsActive");
b.HasIndex("Name")
.IsUnique();
b.HasIndex("Type");
b.ToTable("Credentials", (string)null);
});
modelBuilder.Entity("CredentialManager.Models.KeyAssociation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AdditionalInfo")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("DestinationEntity")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("DestinationId")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("DestinationKeyField")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property("KeyValue")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("LastVerifiedAt")
.HasColumnType("TEXT");
b.Property("RestCredentialName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("SourceKeyField")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("SourcesInfo")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CreatedAt");
b.HasIndex("DestinationEntity");
b.HasIndex("IsActive");
b.HasIndex("KeyValue")
.HasDatabaseName("IX_KeyAssociations_KeyValue");
b.HasIndex("LastVerifiedAt");
b.HasIndex("RestCredentialName");
b.HasIndex("KeyValue", "DestinationEntity", "RestCredentialName")
.IsUnique()
.HasDatabaseName("IX_KeyAssociations_Unique");
b.ToTable("KeyAssociations", (string)null);
});
#pragma warning restore 612, 618
}
}
}