Topup functions

This commit is contained in:
2023-07-04 14:11:53 +01:00
parent 013008dcf9
commit 00c918b1f6
17 changed files with 6519 additions and 12 deletions

View File

@ -7,11 +7,21 @@ public class PaymentsConfiguration : IEntityTypeConfiguration<Payment>
{
public void Configure(EntityTypeBuilder<Payment> builder)
{
builder.HasKey(a => a.PubKey);
builder.HasKey(a => a.PaymentHash);
builder.Property(a => a.Invoice)
.IsRequired();
builder.Property(a => a.IsPaid)
.IsRequired();
builder.Property(a => a.Amount)
.IsRequired();
builder.Property(a => a.Created)
.IsRequired();
builder.HasOne(a => a.User)
.WithMany(a => a.Payments)
.HasForeignKey(a => a.PubKey);
}
}

View File

@ -14,5 +14,8 @@ public class UserConfiguration : IEntityTypeConfiguration<User>
builder.Property(a => a.Event);
builder.Property(a => a.Balance)
.IsRequired();
builder.Property(a => a.Version)
.IsRowVersion();
}
}