28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Fitness_core_BE.Models
|
|
{
|
|
// Manual/ad-hoc ledger line (e.g. rent, utilities, misc income) — a simple ledger for
|
|
// things not already captured elsewhere. The full P&L view merges these with derived
|
|
// entries from PaymentTransaction (member payments), ClientInvoice (platform fees) and
|
|
// StaffPayment (payroll), rather than duplicating those into this table.
|
|
public class LedgerEntry
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; }
|
|
|
|
public Guid FKClientId { get; set; }
|
|
[ForeignKey("FKClientId")]
|
|
public virtual Client Client { get; set; }
|
|
|
|
public string EntryType { get; set; } = "Expense"; // "Income" | "Expense"
|
|
public string Category { get; set; } = "Other";
|
|
public string? Description { get; set; }
|
|
public decimal Amount { get; set; }
|
|
public DateTime EntryDate { get; set; } = DateTime.UtcNow;
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|
|
}
|