// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using YarpGateway.Data; #nullable disable namespace YarpGateway.Migrations { [DbContext(typeof(GatewayDbContext))] partial class GatewayDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("YarpGateway.Models.GwPendingServiceDiscovery", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("AssignedAt") .HasColumnType("timestamp with time zone"); b.Property("AssignedBy") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("AssignedClusterId") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("DiscoveredAt") .HasColumnType("timestamp with time zone"); b.Property("DiscoveredPorts") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("K8sClusterIP") .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("K8sNamespace") .IsRequired() .HasMaxLength(255) .HasColumnType("character varying(255)"); b.Property("K8sServiceName") .IsRequired() .HasMaxLength(255) .HasColumnType("character varying(255)"); b.Property("Labels") .IsRequired() .HasMaxLength(2000) .HasColumnType("character varying(2000)"); b.Property("PodCount") .HasColumnType("integer"); b.Property("Status") .HasColumnType("integer"); b.Property("Version") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("DiscoveredAt"); b.HasIndex("Status"); b.HasIndex("K8sServiceName", "K8sNamespace", "IsDeleted") .IsUnique(); b.ToTable("PendingServiceDiscoveries"); }); modelBuilder.Entity("YarpGateway.Models.GwServiceInstance", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)"); b.Property("ClusterId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("CreatedBy") .HasColumnType("bigint"); b.Property("CreatedTime") .HasColumnType("timestamp with time zone"); b.Property("DestinationId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("Health") .HasColumnType("integer"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("Status") .HasColumnType("integer"); b.Property("UpdatedBy") .HasColumnType("bigint"); b.Property("UpdatedTime") .HasColumnType("timestamp with time zone"); b.Property("Version") .HasColumnType("integer"); b.Property("Weight") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("Health"); b.HasIndex("ClusterId", "DestinationId") .IsUnique(); b.ToTable("ServiceInstances"); }); modelBuilder.Entity("YarpGateway.Models.GwTenant", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("CreatedBy") .HasColumnType("bigint"); b.Property("CreatedTime") .HasColumnType("timestamp with time zone"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("Status") .HasColumnType("integer"); b.Property("TenantCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("TenantName") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("UpdatedBy") .HasColumnType("bigint"); b.Property("UpdatedTime") .HasColumnType("timestamp with time zone"); b.Property("Version") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("TenantCode") .IsUnique(); b.ToTable("Tenants"); }); modelBuilder.Entity("YarpGateway.Models.GwTenantRoute", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ClusterId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("CreatedBy") .HasColumnType("bigint"); b.Property("CreatedTime") .HasColumnType("timestamp with time zone"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("IsGlobal") .HasColumnType("boolean"); b.Property("PathPattern") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)"); b.Property("Priority") .HasColumnType("integer"); b.Property("ServiceName") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("Status") .HasColumnType("integer"); b.Property("TenantCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("UpdatedBy") .HasColumnType("bigint"); b.Property("UpdatedTime") .HasColumnType("timestamp with time zone"); b.Property("Version") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("ClusterId"); b.HasIndex("ServiceName"); b.HasIndex("TenantCode"); b.HasIndex("ServiceName", "IsGlobal", "Status"); b.ToTable("TenantRoutes"); }); #pragma warning restore 612, 618 } } }