47 lines
2.0 KiB
C#
47 lines
2.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Fitness_core_BE.Models
|
|
{
|
|
public class ClientPackage
|
|
{
|
|
|
|
[Key]
|
|
public Guid ClientPackageId { get; set; }
|
|
public string? PackageName { get; set; }
|
|
public string? PackageDescription { get; set; }
|
|
public decimal PackagePrice { get; set; }
|
|
|
|
// Platform (HexaFitness -> gym) billing formula for this plan.
|
|
// baseFee = MinimumMonthlyBill + max(0, min(activeMembers, MaxBillableMemberCount) - IncludedMemberCount) * PerMemberRate,
|
|
// capped by MonthlyCap when set. PerMemberRate = 0 preserves legacy flat-PackagePrice behavior for existing rows.
|
|
public decimal PerMemberRate { get; set; } = 0;
|
|
public decimal MinimumMonthlyBill { get; set; } = 0;
|
|
public decimal? MonthlyCap { get; set; }
|
|
public decimal SetupFee { get; set; } = 0;
|
|
|
|
// Members already covered by MinimumMonthlyBill before PerMemberRate overage kicks in.
|
|
public int IncludedMemberCount { get; set; } = 0;
|
|
// Optional ceiling on the member count billed for (null = unlimited).
|
|
public int? MaxBillableMemberCount { get; set; }
|
|
|
|
// Platform's cut of a client's own member-billing, depending on which gateway
|
|
// (the client's own, or HexaFitness's) their member payments route through.
|
|
public decimal OwnGatewayFeePercent { get; set; } = 0;
|
|
public decimal OwnGatewayFeeFixed { get; set; } = 0;
|
|
public decimal OurGatewayFeePercent { get; set; } = 0;
|
|
public decimal OurGatewayFeeFixed { get; set; } = 0;
|
|
|
|
// Day of month (1-28) the client is paid out on, for clients on their own gateway.
|
|
public int PayoutDayOfMonth { get; set; } = 1;
|
|
|
|
// The plan applied to a client when it has no active ClientSubscription assignment.
|
|
// Only one row should have IsDefault = true.
|
|
public bool IsDefault { get; set; } = false;
|
|
|
|
public bool IsActive { get; set; } = true;
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
|
|
}
|
|
}
|