Initial commit

This commit is contained in:
2026-04-23 21:38:24 -04:00
commit 63e12a9636
1762 changed files with 1672620 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
using PowderCoating.Core.Enums;
namespace PowderCoating.Core.Entities;
/// <summary>
/// Records a refund issued to a customer against an invoice.
/// Does not move actual money — the shop issues the refund manually.
/// </summary>
public class Refund : BaseEntity
{
public int InvoiceId { get; set; }
public int? PaymentId { get; set; } // Specific payment being refunded (optional)
public decimal Amount { get; set; }
public DateTime RefundDate { get; set; } = DateTime.UtcNow;
public PaymentMethod RefundMethod { get; set; }
public string Reason { get; set; } = string.Empty;
public string? Reference { get; set; } // Check #, transaction ID, etc.
public string? Notes { get; set; }
public RefundStatus Status { get; set; } = RefundStatus.Pending;
public DateTime? IssuedDate { get; set; }
public string? IssuedById { get; set; }
// For store-credit refunds: the CreditMemo created on their behalf
public int? CreditMemoId { get; set; }
// Navigation
public virtual Invoice Invoice { get; set; } = null!;
public virtual Payment? Payment { get; set; }
public virtual ApplicationUser? IssuedBy { get; set; }
public virtual CreditMemo? CreditMemo { get; set; }
}