< Summary - Combined Code Coverage

Information
Class: NLightning.Infrastructure.Persistence.Postgres.Migrations.NLightningDbContextModelSnapshot
Assembly: NLightning.Infrastructure.Persistence.Postgres
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure.Persistence.Postgres/Migrations/NLightningDbContextModelSnapshot.cs
Tag: 36_15743069263
Line coverage
0%
Covered lines: 0
Uncovered lines: 407
Coverable lines: 407
Total lines: 443
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildModel(...)100%210%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure.Persistence.Postgres/Migrations/NLightningDbContextModelSnapshot.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Microsoft.EntityFrameworkCore;
 4using Microsoft.EntityFrameworkCore.Infrastructure;
 5using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 6using NLightning.Infrastructure.Persistence.Contexts;
 7using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 8
 9#nullable disable
 10
 11namespace NLightning.Infrastructure.Persistence.Postgres.Migrations
 12{
 13    [DbContext(typeof(NLightningDbContext))]
 14    partial class NLightningDbContextModelSnapshot : ModelSnapshot
 15    {
 16        protected override void BuildModel(ModelBuilder modelBuilder)
 17        {
 18#pragma warning disable 612, 618
 019            modelBuilder
 020                .HasAnnotation("ProductVersion", "8.0.12")
 021                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 22
 023            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 24
 025            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.BlockchainStateEntity", b =>
 026                {
 027                    b.Property<Guid>("Id")
 028                        .ValueGeneratedOnAdd()
 029                        .HasColumnType("uuid")
 030                        .HasColumnName("id");
 031
 032                    b.Property<DateTime>("LastProcessedAt")
 033                        .HasColumnType("timestamp with time zone")
 034                        .HasColumnName("last_processed_at");
 035
 036                    b.Property<byte[]>("LastProcessedBlockHash")
 037                        .IsRequired()
 038                        .HasColumnType("bytea")
 039                        .HasColumnName("last_processed_block_hash");
 040
 041                    b.Property<long>("LastProcessedHeight")
 042                        .HasColumnType("bigint")
 043                        .HasColumnName("last_processed_height");
 044
 045                    b.HasKey("Id")
 046                        .HasName("pk_blockchain_states");
 047
 048                    b.ToTable("blockchain_states", (string)null);
 049                });
 50
 051            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WatchedTransactionEntity", b =>
 052                {
 053                    b.Property<byte[]>("TransactionId")
 054                        .HasColumnType("bytea")
 055                        .HasColumnName("transaction_id");
 056
 057                    b.Property<byte[]>("ChannelId")
 058                        .IsRequired()
 059                        .HasColumnType("bytea")
 060                        .HasColumnName("channel_id");
 061
 062                    b.Property<DateTime?>("CompletedAt")
 063                        .HasColumnType("timestamp with time zone")
 064                        .HasColumnName("completed_at");
 065
 066                    b.Property<DateTime>("CreatedAt")
 067                        .HasColumnType("timestamp with time zone")
 068                        .HasColumnName("created_at");
 069
 070                    b.Property<long?>("FirstSeenAtHeight")
 071                        .HasColumnType("bigint")
 072                        .HasColumnName("first_seen_at_height");
 073
 074                    b.Property<long>("RequiredDepth")
 075                        .HasColumnType("bigint")
 076                        .HasColumnName("required_depth");
 077
 078                    b.Property<int?>("TransactionIndex")
 079                        .HasColumnType("integer")
 080                        .HasColumnName("transaction_index");
 081
 082                    b.HasKey("TransactionId")
 083                        .HasName("pk_watched_transactions");
 084
 085                    b.HasIndex("ChannelId")
 086                        .HasDatabaseName("ix_watched_transactions_channel_id");
 087
 088                    b.ToTable("watched_transactions", (string)null);
 089                });
 90
 091            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelConfigEntity", b =>
 092                {
 093                    b.Property<byte[]>("ChannelId")
 094                        .HasColumnType("bytea")
 095                        .HasColumnName("channel_id");
 096
 097                    b.Property<long?>("ChannelReserveAmountSats")
 098                        .HasColumnType("bigint")
 099                        .HasColumnName("channel_reserve_amount_sats");
 0100
 0101                    b.Property<long>("FeeRatePerKwSatoshis")
 0102                        .HasColumnType("bigint")
 0103                        .HasColumnName("fee_rate_per_kw_satoshis");
 0104
 0105                    b.Property<decimal>("HtlcMinimumMsat")
 0106                        .HasColumnType("numeric(20,0)")
 0107                        .HasColumnName("htlc_minimum_msat");
 0108
 0109                    b.Property<long>("LocalDustLimitAmountSats")
 0110                        .HasColumnType("bigint")
 0111                        .HasColumnName("local_dust_limit_amount_sats");
 0112
 0113                    b.Property<byte[]>("LocalUpfrontShutdownScript")
 0114                        .HasColumnType("bytea")
 0115                        .HasColumnName("local_upfront_shutdown_script");
 0116
 0117                    b.Property<int>("MaxAcceptedHtlcs")
 0118                        .HasColumnType("integer")
 0119                        .HasColumnName("max_accepted_htlcs");
 0120
 0121                    b.Property<decimal>("MaxHtlcAmountInFlight")
 0122                        .HasColumnType("numeric(20,0)")
 0123                        .HasColumnName("max_htlc_amount_in_flight");
 0124
 0125                    b.Property<long>("MinimumDepth")
 0126                        .HasColumnType("bigint")
 0127                        .HasColumnName("minimum_depth");
 0128
 0129                    b.Property<bool>("OptionAnchorOutputs")
 0130                        .HasColumnType("boolean")
 0131                        .HasColumnName("option_anchor_outputs");
 0132
 0133                    b.Property<long>("RemoteDustLimitAmountSats")
 0134                        .HasColumnType("bigint")
 0135                        .HasColumnName("remote_dust_limit_amount_sats");
 0136
 0137                    b.Property<byte[]>("RemoteUpfrontShutdownScript")
 0138                        .HasColumnType("bytea")
 0139                        .HasColumnName("remote_upfront_shutdown_script");
 0140
 0141                    b.Property<int>("ToSelfDelay")
 0142                        .HasColumnType("integer")
 0143                        .HasColumnName("to_self_delay");
 0144
 0145                    b.Property<byte>("UseScidAlias")
 0146                        .HasColumnType("smallint")
 0147                        .HasColumnName("use_scid_alias");
 0148
 0149                    b.HasKey("ChannelId")
 0150                        .HasName("pk_channel_configs");
 0151
 0152                    b.ToTable("channel_configs", (string)null);
 0153                });
 154
 0155            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", b =>
 0156                {
 0157                    b.Property<byte[]>("ChannelId")
 0158                        .HasColumnType("bytea")
 0159                        .HasColumnName("channel_id");
 0160
 0161                    b.Property<long>("FundingAmountSatoshis")
 0162                        .HasColumnType("bigint")
 0163                        .HasColumnName("funding_amount_satoshis");
 0164
 0165                    b.Property<long>("FundingCreatedAtBlockHeight")
 0166                        .HasColumnType("bigint")
 0167                        .HasColumnName("funding_created_at_block_height");
 0168
 0169                    b.Property<int>("FundingOutputIndex")
 0170                        .HasColumnType("integer")
 0171                        .HasColumnName("funding_output_index");
 0172
 0173                    b.Property<byte[]>("FundingTxId")
 0174                        .IsRequired()
 0175                        .HasColumnType("bytea")
 0176                        .HasColumnName("funding_tx_id");
 0177
 0178                    b.Property<bool>("IsInitiator")
 0179                        .HasColumnType("boolean")
 0180                        .HasColumnName("is_initiator");
 0181
 0182                    b.Property<byte[]>("LastReceivedSignature")
 0183                        .HasColumnType("bytea")
 0184                        .HasColumnName("last_received_signature");
 0185
 0186                    b.Property<byte[]>("LastSentSignature")
 0187                        .HasColumnType("bytea")
 0188                        .HasColumnName("last_sent_signature");
 0189
 0190                    b.Property<decimal>("LocalBalanceSatoshis")
 0191                        .HasColumnType("numeric")
 0192                        .HasColumnName("local_balance_satoshis");
 0193
 0194                    b.Property<decimal>("LocalNextHtlcId")
 0195                        .HasColumnType("numeric(20,0)")
 0196                        .HasColumnName("local_next_htlc_id");
 0197
 0198                    b.Property<decimal>("LocalRevocationNumber")
 0199                        .HasColumnType("numeric(20,0)")
 0200                        .HasColumnName("local_revocation_number");
 0201
 0202                    b.Property<byte[]>("PeerEntityNodeId")
 0203                        .HasColumnType("bytea")
 0204                        .HasColumnName("peer_entity_node_id");
 0205
 0206                    b.Property<decimal>("RemoteBalanceSatoshis")
 0207                        .HasColumnType("numeric")
 0208                        .HasColumnName("remote_balance_satoshis");
 0209
 0210                    b.Property<decimal>("RemoteNextHtlcId")
 0211                        .HasColumnType("numeric(20,0)")
 0212                        .HasColumnName("remote_next_htlc_id");
 0213
 0214                    b.Property<byte[]>("RemoteNodeId")
 0215                        .IsRequired()
 0216                        .HasColumnType("bytea")
 0217                        .HasColumnName("remote_node_id");
 0218
 0219                    b.Property<decimal>("RemoteRevocationNumber")
 0220                        .HasColumnType("numeric(20,0)")
 0221                        .HasColumnName("remote_revocation_number");
 0222
 0223                    b.Property<byte>("State")
 0224                        .HasColumnType("smallint")
 0225                        .HasColumnName("state");
 0226
 0227                    b.Property<byte>("Version")
 0228                        .HasColumnType("smallint")
 0229                        .HasColumnName("version");
 0230
 0231                    b.HasKey("ChannelId")
 0232                        .HasName("pk_channels");
 0233
 0234                    b.HasIndex("PeerEntityNodeId")
 0235                        .HasDatabaseName("ix_channels_peer_entity_node_id");
 0236
 0237                    b.ToTable("channels", (string)null);
 0238                });
 239
 0240            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelKeySetEntity", b =>
 0241                {
 0242                    b.Property<byte[]>("ChannelId")
 0243                        .HasColumnType("bytea")
 0244                        .HasColumnName("channel_id");
 0245
 0246                    b.Property<bool>("IsLocal")
 0247                        .HasColumnType("boolean")
 0248                        .HasColumnName("is_local");
 0249
 0250                    b.Property<decimal>("CurrentPerCommitmentIndex")
 0251                        .HasColumnType("numeric(20,0)")
 0252                        .HasColumnName("current_per_commitment_index");
 0253
 0254                    b.Property<byte[]>("CurrentPerCommitmentPoint")
 0255                        .IsRequired()
 0256                        .HasColumnType("bytea")
 0257                        .HasColumnName("current_per_commitment_point");
 0258
 0259                    b.Property<byte[]>("DelayedPaymentBasepoint")
 0260                        .IsRequired()
 0261                        .HasColumnType("bytea")
 0262                        .HasColumnName("delayed_payment_basepoint");
 0263
 0264                    b.Property<byte[]>("FundingPubKey")
 0265                        .IsRequired()
 0266                        .HasColumnType("bytea")
 0267                        .HasColumnName("funding_pub_key");
 0268
 0269                    b.Property<byte[]>("HtlcBasepoint")
 0270                        .IsRequired()
 0271                        .HasColumnType("bytea")
 0272                        .HasColumnName("htlc_basepoint");
 0273
 0274                    b.Property<long>("KeyIndex")
 0275                        .HasColumnType("bigint")
 0276                        .HasColumnName("key_index");
 0277
 0278                    b.Property<byte[]>("LastRevealedPerCommitmentSecret")
 0279                        .HasColumnType("bytea")
 0280                        .HasColumnName("last_revealed_per_commitment_secret");
 0281
 0282                    b.Property<byte[]>("PaymentBasepoint")
 0283                        .IsRequired()
 0284                        .HasColumnType("bytea")
 0285                        .HasColumnName("payment_basepoint");
 0286
 0287                    b.Property<byte[]>("RevocationBasepoint")
 0288                        .IsRequired()
 0289                        .HasColumnType("bytea")
 0290                        .HasColumnName("revocation_basepoint");
 0291
 0292                    b.HasKey("ChannelId", "IsLocal")
 0293                        .HasName("pk_channel_key_sets");
 0294
 0295                    b.ToTable("channel_key_sets", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.HtlcEntity", b =>
 0299                {
 0300                    b.Property<byte[]>("ChannelId")
 0301                        .HasColumnType("bytea")
 0302                        .HasColumnName("channel_id");
 0303
 0304                    b.Property<decimal>("HtlcId")
 0305                        .HasColumnType("numeric(20,0)")
 0306                        .HasColumnName("htlc_id");
 0307
 0308                    b.Property<byte>("Direction")
 0309                        .HasColumnType("smallint")
 0310                        .HasColumnName("direction");
 0311
 0312                    b.Property<byte[]>("AddMessageBytes")
 0313                        .IsRequired()
 0314                        .HasColumnType("bytea")
 0315                        .HasColumnName("add_message_bytes");
 0316
 0317                    b.Property<decimal>("AmountMsat")
 0318                        .HasColumnType("numeric(20,0)")
 0319                        .HasColumnName("amount_msat");
 0320
 0321                    b.Property<long>("CltvExpiry")
 0322                        .HasColumnType("bigint")
 0323                        .HasColumnName("cltv_expiry");
 0324
 0325                    b.Property<decimal>("ObscuredCommitmentNumber")
 0326                        .HasColumnType("numeric(20,0)")
 0327                        .HasColumnName("obscured_commitment_number");
 0328
 0329                    b.Property<byte[]>("PaymentHash")
 0330                        .IsRequired()
 0331                        .HasColumnType("bytea")
 0332                        .HasColumnName("payment_hash");
 0333
 0334                    b.Property<byte[]>("PaymentPreimage")
 0335                        .HasColumnType("bytea")
 0336                        .HasColumnName("payment_preimage");
 0337
 0338                    b.Property<byte[]>("Signature")
 0339                        .HasColumnType("bytea")
 0340                        .HasColumnName("signature");
 0341
 0342                    b.Property<byte>("State")
 0343                        .HasColumnType("smallint")
 0344                        .HasColumnName("state");
 0345
 0346                    b.HasKey("ChannelId", "HtlcId", "Direction")
 0347                        .HasName("pk_htlcs");
 0348
 0349                    b.ToTable("htlcs", (string)null);
 0350                });
 351
 0352            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Node.PeerEntity", b =>
 0353                {
 0354                    b.Property<byte[]>("NodeId")
 0355                        .HasColumnType("bytea")
 0356                        .HasColumnName("node_id");
 0357
 0358                    b.Property<string>("Host")
 0359                        .IsRequired()
 0360                        .HasColumnType("text")
 0361                        .HasColumnName("host");
 0362
 0363                    b.Property<DateTime>("LastSeenAt")
 0364                        .HasColumnType("timestamp with time zone")
 0365                        .HasColumnName("last_seen_at");
 0366
 0367                    b.Property<long>("Port")
 0368                        .HasColumnType("bigint")
 0369                        .HasColumnName("port");
 0370
 0371                    b.HasKey("NodeId")
 0372                        .HasName("pk_peers");
 0373
 0374                    b.ToTable("peers", (string)null);
 0375                });
 376
 0377            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WatchedTransactionEntity", b =>
 0378                {
 0379                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0380                        .WithMany("WatchedTransactions")
 0381                        .HasForeignKey("ChannelId")
 0382                        .OnDelete(DeleteBehavior.Cascade)
 0383                        .IsRequired()
 0384                        .HasConstraintName("fk_watched_transactions_channels_channel_id");
 0385                });
 386
 0387            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelConfigEntity", b =>
 0388                {
 0389                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0390                        .WithOne("Config")
 0391                        .HasForeignKey("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelConfigEntity", "Ch
 0392                        .OnDelete(DeleteBehavior.Cascade)
 0393                        .IsRequired()
 0394                        .HasConstraintName("fk_channel_configs_channels_channel_id");
 0395                });
 396
 0397            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", b =>
 0398                {
 0399                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Node.PeerEntity", null)
 0400                        .WithMany("Channels")
 0401                        .HasForeignKey("PeerEntityNodeId")
 0402                        .HasConstraintName("fk_channels_peers_peer_entity_node_id");
 0403                });
 404
 0405            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelKeySetEntity", b =>
 0406                {
 0407                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0408                        .WithMany("KeySets")
 0409                        .HasForeignKey("ChannelId")
 0410                        .OnDelete(DeleteBehavior.Cascade)
 0411                        .IsRequired()
 0412                        .HasConstraintName("fk_channel_key_sets_channels_channel_id");
 0413                });
 414
 0415            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.HtlcEntity", b =>
 0416                {
 0417                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0418                        .WithMany("Htlcs")
 0419                        .HasForeignKey("ChannelId")
 0420                        .OnDelete(DeleteBehavior.Cascade)
 0421                        .IsRequired()
 0422                        .HasConstraintName("fk_htlcs_channels_channel_id");
 0423                });
 424
 0425            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", b =>
 0426                {
 0427                    b.Navigation("Config");
 0428
 0429                    b.Navigation("Htlcs");
 0430
 0431                    b.Navigation("KeySets");
 0432
 0433                    b.Navigation("WatchedTransactions");
 0434                });
 435
 0436            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Node.PeerEntity", b =>
 0437                {
 0438                    b.Navigation("Channels");
 0439                });
 440#pragma warning restore 612, 618
 0441        }
 442    }
 443}