< Summary - Combined Code Coverage

Information
Class: NLightning.Infrastructure.Persistence.SqlServer.Migrations.NLightningDbContextModelSnapshot
Assembly: NLightning.Infrastructure.Persistence.SqlServer
File(s): /home/runner/work/NLightning/NLightning/src/NLightning.Infrastructure.Persistence.SqlServer/Migrations/NLightningDbContextModelSnapshot.cs
Tag: 57_24045730253
Line coverage
0%
Covered lines: 0
Uncovered lines: 426
Coverable lines: 426
Total lines: 466
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.SqlServer/Migrations/NLightningDbContextModelSnapshot.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Microsoft.EntityFrameworkCore;
 4using Microsoft.EntityFrameworkCore.Infrastructure;
 5using Microsoft.EntityFrameworkCore.Metadata;
 6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 7using NLightning.Infrastructure.Persistence.Contexts;
 8
 9#nullable disable
 10
 11namespace NLightning.Infrastructure.Persistence.SqlServer.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", "9.0.9")
 021                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 22
 023            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
 24
 025            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.BlockchainStateEntity", b =>
 026                {
 027                    b.Property<Guid>("Id")
 028                        .ValueGeneratedOnAdd()
 029                        .HasColumnType("uniqueidentifier");
 030
 031                    b.Property<DateTime>("LastProcessedAt")
 032                        .HasColumnType("datetime2");
 033
 034                    b.Property<byte[]>("LastProcessedBlockHash")
 035                        .IsRequired()
 036                        .HasColumnType("varbinary(32)");
 037
 038                    b.Property<long>("LastProcessedHeight")
 039                        .HasColumnType("bigint");
 040
 041                    b.HasKey("Id");
 042
 043                    b.ToTable("BlockchainStates");
 044                });
 45
 046            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.UtxoEntity", b =>
 047                {
 048                    b.Property<byte[]>("TransactionId")
 049                        .HasColumnType("varbinary(32)");
 050
 051                    b.Property<long>("Index")
 052                        .HasColumnType("bigint");
 053
 054                    b.Property<long>("AddressIndex")
 055                        .HasColumnType("bigint");
 056
 057                    b.Property<byte>("AddressType")
 058                        .HasColumnType("tinyint");
 059
 060                    b.Property<long>("AmountSats")
 061                        .HasColumnType("bigint");
 062
 063                    b.Property<long>("BlockHeight")
 064                        .HasColumnType("bigint");
 065
 066                    b.Property<bool>("IsAddressChange")
 067                        .HasColumnType("bit");
 068
 069                    b.Property<byte[]>("LockedToChannelId")
 070                        .HasColumnType("varbinary(32)");
 071
 072                    b.Property<byte[]>("UsedInTransactionId")
 073                        .HasColumnType("varbinary(900)");
 074
 075                    b.HasKey("TransactionId", "Index");
 076
 077                    b.HasIndex("AddressType")
 078                        .HasAnnotation("SqlServer:Online", true);
 079
 080                    b.HasIndex("LockedToChannelId")
 081                        .HasAnnotation("SqlServer:Online", true);
 082
 083                    b.HasIndex("UsedInTransactionId")
 084                        .HasAnnotation("SqlServer:Online", true);
 085
 086                    b.HasIndex("AddressIndex", "IsAddressChange", "AddressType")
 087                        .HasAnnotation("SqlServer:Online", true);
 088
 089                    b.ToTable("Utxos");
 090                });
 91
 092            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WalletAddressEntity", b =>
 093                {
 094                    b.Property<long>("Index")
 095                        .HasColumnType("bigint");
 096
 097                    b.Property<bool>("IsChange")
 098                        .HasColumnType("bit");
 099
 0100                    b.Property<byte>("AddressType")
 0101                        .HasColumnType("tinyint");
 0102
 0103                    b.Property<string>("Address")
 0104                        .IsRequired()
 0105                        .HasColumnType("nvarchar(max)");
 0106
 0107                    b.HasKey("Index", "IsChange", "AddressType");
 0108
 0109                    b.ToTable("WalletAddresses");
 0110                });
 111
 0112            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WatchedTransactionEntity", b =>
 0113                {
 0114                    b.Property<byte[]>("TransactionId")
 0115                        .HasColumnType("varbinary(32)");
 0116
 0117                    b.Property<byte[]>("ChannelId")
 0118                        .IsRequired()
 0119                        .HasColumnType("varbinary(32)");
 0120
 0121                    b.Property<DateTime?>("CompletedAt")
 0122                        .HasColumnType("datetime2");
 0123
 0124                    b.Property<DateTime>("CreatedAt")
 0125                        .HasColumnType("datetime2");
 0126
 0127                    b.Property<long?>("FirstSeenAtHeight")
 0128                        .HasColumnType("bigint");
 0129
 0130                    b.Property<long>("RequiredDepth")
 0131                        .HasColumnType("bigint");
 0132
 0133                    b.Property<int?>("TransactionIndex")
 0134                        .HasColumnType("int");
 0135
 0136                    b.HasKey("TransactionId");
 0137
 0138                    b.HasIndex("ChannelId");
 0139
 0140                    b.ToTable("WatchedTransactions");
 0141                });
 142
 0143            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelConfigEntity", b =>
 0144                {
 0145                    b.Property<byte[]>("ChannelId")
 0146                        .HasColumnType("varbinary(32)");
 0147
 0148                    b.Property<long?>("ChannelReserveAmountSats")
 0149                        .HasColumnType("bigint");
 0150
 0151                    b.Property<long>("FeeRatePerKwSatoshis")
 0152                        .HasColumnType("bigint");
 0153
 0154                    b.Property<decimal>("HtlcMinimumMsat")
 0155                        .HasColumnType("decimal(20,0)");
 0156
 0157                    b.Property<long>("LocalDustLimitAmountSats")
 0158                        .HasColumnType("bigint");
 0159
 0160                    b.Property<byte[]>("LocalUpfrontShutdownScript")
 0161                        .HasColumnType("varbinary(max)");
 0162
 0163                    b.Property<int>("MaxAcceptedHtlcs")
 0164                        .HasColumnType("int");
 0165
 0166                    b.Property<decimal>("MaxHtlcAmountInFlight")
 0167                        .HasColumnType("decimal(20,0)");
 0168
 0169                    b.Property<long>("MinimumDepth")
 0170                        .HasColumnType("bigint");
 0171
 0172                    b.Property<bool>("OptionAnchorOutputs")
 0173                        .HasColumnType("bit");
 0174
 0175                    b.Property<long>("RemoteDustLimitAmountSats")
 0176                        .HasColumnType("bigint");
 0177
 0178                    b.Property<byte[]>("RemoteUpfrontShutdownScript")
 0179                        .HasColumnType("varbinary(max)");
 0180
 0181                    b.Property<int>("ToSelfDelay")
 0182                        .HasColumnType("int");
 0183
 0184                    b.Property<byte>("UseScidAlias")
 0185                        .HasColumnType("tinyint");
 0186
 0187                    b.HasKey("ChannelId");
 0188
 0189                    b.ToTable("ChannelConfigs");
 0190                });
 191
 0192            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", b =>
 0193                {
 0194                    b.Property<byte[]>("ChannelId")
 0195                        .HasColumnType("varbinary(32)");
 0196
 0197                    b.Property<byte?>("ChangeAddressAddressType")
 0198                        .HasColumnType("tinyint");
 0199
 0200                    b.Property<long?>("ChangeAddressIndex")
 0201                        .HasColumnType("bigint");
 0202
 0203                    b.Property<bool?>("ChangeAddressIsChange")
 0204                        .HasColumnType("bit");
 0205
 0206                    b.Property<byte?>("ChangeAddressType")
 0207                        .HasColumnType("tinyint");
 0208
 0209                    b.Property<long>("FundingAmountSatoshis")
 0210                        .HasColumnType("bigint");
 0211
 0212                    b.Property<long>("FundingCreatedAtBlockHeight")
 0213                        .HasColumnType("bigint");
 0214
 0215                    b.Property<int>("FundingOutputIndex")
 0216                        .HasColumnType("int");
 0217
 0218                    b.Property<byte[]>("FundingTxId")
 0219                        .IsRequired()
 0220                        .HasColumnType("varbinary(32)");
 0221
 0222                    b.Property<bool>("IsInitiator")
 0223                        .HasColumnType("bit");
 0224
 0225                    b.Property<byte[]>("LastReceivedSignature")
 0226                        .HasColumnType("varbinary(64)");
 0227
 0228                    b.Property<byte[]>("LastSentSignature")
 0229                        .HasColumnType("varbinary(64)");
 0230
 0231                    b.Property<long>("LocalBalanceSatoshis")
 0232                        .HasColumnType("bigint");
 0233
 0234                    b.Property<decimal>("LocalNextHtlcId")
 0235                        .HasColumnType("decimal(20,0)");
 0236
 0237                    b.Property<decimal>("LocalRevocationNumber")
 0238                        .HasColumnType("decimal(20,0)");
 0239
 0240                    b.Property<byte[]>("PeerEntityNodeId")
 0241                        .HasColumnType("varbinary(33)");
 0242
 0243                    b.Property<long>("RemoteBalanceSatoshis")
 0244                        .HasColumnType("bigint");
 0245
 0246                    b.Property<decimal>("RemoteNextHtlcId")
 0247                        .HasColumnType("decimal(20,0)");
 0248
 0249                    b.Property<byte[]>("RemoteNodeId")
 0250                        .IsRequired()
 0251                        .HasColumnType("varbinary(32)");
 0252
 0253                    b.Property<decimal>("RemoteRevocationNumber")
 0254                        .HasColumnType("decimal(20,0)");
 0255
 0256                    b.Property<byte>("State")
 0257                        .HasColumnType("tinyint");
 0258
 0259                    b.Property<byte>("Version")
 0260                        .HasColumnType("tinyint");
 0261
 0262                    b.HasKey("ChannelId");
 0263
 0264                    b.HasIndex("PeerEntityNodeId");
 0265
 0266                    b.HasIndex("ChangeAddressIndex", "ChangeAddressIsChange", "ChangeAddressAddressType");
 0267
 0268                    b.ToTable("Channels");
 0269                });
 270
 0271            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelKeySetEntity", b =>
 0272                {
 0273                    b.Property<byte[]>("ChannelId")
 0274                        .HasColumnType("varbinary(32)");
 0275
 0276                    b.Property<bool>("IsLocal")
 0277                        .HasColumnType("bit");
 0278
 0279                    b.Property<decimal>("CurrentPerCommitmentIndex")
 0280                        .HasColumnType("decimal(20,0)");
 0281
 0282                    b.Property<byte[]>("CurrentPerCommitmentPoint")
 0283                        .IsRequired()
 0284                        .HasColumnType("varbinary(33)");
 0285
 0286                    b.Property<byte[]>("DelayedPaymentBasepoint")
 0287                        .IsRequired()
 0288                        .HasColumnType("varbinary(33)");
 0289
 0290                    b.Property<byte[]>("FundingPubKey")
 0291                        .IsRequired()
 0292                        .HasColumnType("varbinary(33)");
 0293
 0294                    b.Property<byte[]>("HtlcBasepoint")
 0295                        .IsRequired()
 0296                        .HasColumnType("varbinary(33)");
 0297
 0298                    b.Property<long>("KeyIndex")
 0299                        .HasColumnType("bigint");
 0300
 0301                    b.Property<byte[]>("LastRevealedPerCommitmentSecret")
 0302                        .HasColumnType("varbinary(max)");
 0303
 0304                    b.Property<byte[]>("PaymentBasepoint")
 0305                        .IsRequired()
 0306                        .HasColumnType("varbinary(33)");
 0307
 0308                    b.Property<byte[]>("RevocationBasepoint")
 0309                        .IsRequired()
 0310                        .HasColumnType("varbinary(33)");
 0311
 0312                    b.HasKey("ChannelId", "IsLocal");
 0313
 0314                    b.ToTable("ChannelKeySets");
 0315                });
 316
 0317            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.HtlcEntity", b =>
 0318                {
 0319                    b.Property<byte[]>("ChannelId")
 0320                        .HasColumnType("varbinary(32)");
 0321
 0322                    b.Property<decimal>("HtlcId")
 0323                        .HasColumnType("decimal(20,0)");
 0324
 0325                    b.Property<byte>("Direction")
 0326                        .HasColumnType("tinyint");
 0327
 0328                    b.Property<byte[]>("AddMessageBytes")
 0329                        .IsRequired()
 0330                        .HasColumnType("varbinary(max)");
 0331
 0332                    b.Property<decimal>("AmountMsat")
 0333                        .HasColumnType("decimal(20,0)");
 0334
 0335                    b.Property<long>("CltvExpiry")
 0336                        .HasColumnType("bigint");
 0337
 0338                    b.Property<decimal>("ObscuredCommitmentNumber")
 0339                        .HasColumnType("decimal(20,0)");
 0340
 0341                    b.Property<byte[]>("PaymentHash")
 0342                        .IsRequired()
 0343                        .HasColumnType("varbinary(32)");
 0344
 0345                    b.Property<byte[]>("PaymentPreimage")
 0346                        .HasColumnType("varbinary(32)");
 0347
 0348                    b.Property<byte[]>("Signature")
 0349                        .HasColumnType("varbinary(max)");
 0350
 0351                    b.Property<byte>("State")
 0352                        .HasColumnType("tinyint");
 0353
 0354                    b.HasKey("ChannelId", "HtlcId", "Direction");
 0355
 0356                    b.ToTable("Htlcs");
 0357                });
 358
 0359            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Node.PeerEntity", b =>
 0360                {
 0361                    b.Property<byte[]>("NodeId")
 0362                        .HasColumnType("varbinary(33)");
 0363
 0364                    b.Property<string>("Host")
 0365                        .IsRequired()
 0366                        .HasColumnType("nvarchar(max)");
 0367
 0368                    b.Property<DateTime>("LastSeenAt")
 0369                        .HasColumnType("datetime2");
 0370
 0371                    b.Property<long>("Port")
 0372                        .HasColumnType("bigint");
 0373
 0374                    b.Property<string>("Type")
 0375                        .IsRequired()
 0376                        .HasColumnType("nvarchar(max)");
 0377
 0378                    b.HasKey("NodeId");
 0379
 0380                    b.ToTable("Peers");
 0381                });
 382
 0383            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.UtxoEntity", b =>
 0384                {
 0385                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WalletAddressEntity", "WalletAddres
 0386                        .WithMany("Utxos")
 0387                        .HasForeignKey("AddressIndex", "IsAddressChange", "AddressType")
 0388                        .OnDelete(DeleteBehavior.Cascade)
 0389                        .IsRequired();
 0390
 0391                    b.Navigation("WalletAddress");
 0392                });
 393
 0394            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WatchedTransactionEntity", b =>
 0395                {
 0396                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0397                        .WithMany("WatchedTransactions")
 0398                        .HasForeignKey("ChannelId")
 0399                        .OnDelete(DeleteBehavior.Cascade)
 0400                        .IsRequired();
 0401                });
 402
 0403            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelConfigEntity", b =>
 0404                {
 0405                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0406                        .WithOne("Config")
 0407                        .HasForeignKey("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelConfigEntity", "Ch
 0408                        .OnDelete(DeleteBehavior.Cascade)
 0409                        .IsRequired();
 0410                });
 411
 0412            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", b =>
 0413                {
 0414                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Node.PeerEntity", null)
 0415                        .WithMany("Channels")
 0416                        .HasForeignKey("PeerEntityNodeId");
 0417
 0418                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WalletAddressEntity", "ChangeAddres
 0419                        .WithMany()
 0420                        .HasForeignKey("ChangeAddressIndex", "ChangeAddressIsChange", "ChangeAddressAddressType");
 0421
 0422                    b.Navigation("ChangeAddress");
 0423                });
 424
 0425            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelKeySetEntity", b =>
 0426                {
 0427                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0428                        .WithMany("KeySets")
 0429                        .HasForeignKey("ChannelId")
 0430                        .OnDelete(DeleteBehavior.Cascade)
 0431                        .IsRequired();
 0432                });
 433
 0434            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.HtlcEntity", b =>
 0435                {
 0436                    b.HasOne("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", null)
 0437                        .WithMany("Htlcs")
 0438                        .HasForeignKey("ChannelId")
 0439                        .OnDelete(DeleteBehavior.Cascade)
 0440                        .IsRequired();
 0441                });
 442
 0443            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Bitcoin.WalletAddressEntity", b =>
 0444                {
 0445                    b.Navigation("Utxos");
 0446                });
 447
 0448            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Channel.ChannelEntity", b =>
 0449                {
 0450                    b.Navigation("Config");
 0451
 0452                    b.Navigation("Htlcs");
 0453
 0454                    b.Navigation("KeySets");
 0455
 0456                    b.Navigation("WatchedTransactions");
 0457                });
 458
 0459            modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.Node.PeerEntity", b =>
 0460                {
 0461                    b.Navigation("Channels");
 0462                });
 463#pragma warning restore 612, 618
 0464        }
 465    }
 466}