mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
25 lines
691 B
C#
25 lines
691 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace BTCPayServer.Data
|
|
{
|
|
public class PaymentData
|
|
{
|
|
public string Id { get; set; }
|
|
public string InvoiceDataId { get; set; }
|
|
public InvoiceData InvoiceData { get; set; }
|
|
|
|
public byte[] Blob { get; set; }
|
|
public bool Accounted { get; set; }
|
|
|
|
|
|
internal static void OnModelCreating(ModelBuilder builder)
|
|
{
|
|
builder.Entity<PaymentData>()
|
|
.HasOne(o => o.InvoiceData)
|
|
.WithMany(i => i.Payments).OnDelete(DeleteBehavior.Cascade);
|
|
builder.Entity<PaymentData>()
|
|
.HasIndex(o => o.InvoiceDataId);
|
|
}
|
|
}
|
|
}
|