first commit

This commit is contained in:
Dhananjaya99
2026-09-28 11:44:26 +05:30
parent 721743ae6b
commit bffc9b1686
424 changed files with 46474 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models
{
/// <summary>One deduction event against a TimeBankCard's balance — an append-only ledger so
/// MinutesRemaining is always auditable/reconstructable, the same reasoning as LedgerEntry
/// for money.</summary>
public class TimeBankCardUsageLog
{
[Key]
public Guid TimeBankCardUsageLogId { get; set; }
public Guid FKTimeBankCardId { get; set; }
[ForeignKey(nameof(FKTimeBankCardId))]
public TimeBankCard TimeBankCard { get; set; }
public Guid FKClientId { get; set; }
[ForeignKey(nameof(FKClientId))]
public Client Client { get; set; }
// Which facility this swipe/use was against -- not a FacilitySession, since a time-bank
// card is spent on open-ended usage (e.g. "swim for however long"), not a fixed
// pre-booked slot the way Booking is.
public Guid FKFacilityId { get; set; }
[ForeignKey(nameof(FKFacilityId))]
public Facility Facility { get; set; }
public int MinutesDeducted { get; set; }
public int MinutesRemainingAfter { get; set; }
public DateTime UsedAt { get; set; } = DateTime.UtcNow;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}