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
+34
View File
@@ -0,0 +1,34 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models
{
/// <summary>
/// One scheduled part of a subscription's price (mostly-equal split, e.g. a
/// Rs. 6000 six-month plan → 6 monthly rows of Rs. 1000; the last row absorbs
/// rounding). Payments are allocated to installments in InstallmentNo order.
/// InstallmentCount = 1 plans get a single row due at onboarding.
/// </summary>
public class SubscriptionInstallment
{
[Key]
public Guid SubscriptionInstallmentId { get; set; }
public Guid FKSubscriptionId { get; set; }
[ForeignKey("FKSubscriptionId")]
public virtual CustomerSubscription Subscription { get; set; }
/// <summary>1-based position in the schedule.</summary>
public int InstallmentNo { get; set; }
public DateTime DueDate { get; set; }
public decimal Amount { get; set; }
public decimal PaidAmount { get; set; } = 0m;
/// <summary>"Pending" | "Partial" | "Paid".</summary>
public string Status { get; set; } = "Pending";
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}