first commit
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user