Topup functions
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user