2020-06-27 21:55:16 +09:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2017-09-13 15:47:34 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Data
|
|
|
|
{
|
2017-10-27 17:53:04 +09:00
|
|
|
public class PaymentData
|
|
|
|
{
|
|
|
|
public string Id
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2017-09-13 15:47:34 +09:00
|
|
|
|
2017-10-27 17:53:04 +09:00
|
|
|
public string InvoiceDataId
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
|
|
|
public InvoiceData InvoiceData
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2017-09-13 15:47:34 +09:00
|
|
|
|
2017-10-27 17:53:04 +09:00
|
|
|
public byte[] Blob
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2017-11-06 00:31:02 -08:00
|
|
|
public bool Accounted
|
|
|
|
{
|
|
|
|
get; set;
|
|
|
|
}
|
2020-06-27 21:55:16 +09:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2017-10-27 17:53:04 +09:00
|
|
|
}
|
2017-09-13 15:47:34 +09:00
|
|
|
}
|