19 lines
902 B
C#
19 lines
902 B
C#
using Fitness_core_BE.Models;
|
|
|
|
namespace Fitness_core_BE.Interfaces
|
|
{
|
|
public interface ICustomerPlanRepository
|
|
{
|
|
Task<List<CustomerPlan>> GetAllCustomerPlans(bool includeInactive = false, Guid? clientId = null); Task<CustomerPlan?> GetCustomerPlanById(Guid customerPlanId);
|
|
Task<CustomerPlan> CreateCustomerPlan(CustomerPlan customerPlan);
|
|
Task<CustomerPlan> UpdateCustomerPlan(CustomerPlan customerPlan);
|
|
|
|
// Status-only toggle. Deliberately separate from UpdateCustomerPlan: reactivating a
|
|
// plan must not re-run the whole cross-field configuration validation, so an older
|
|
// plan whose config predates a rule can still be switched back on.
|
|
Task<CustomerPlan?> SetCustomerPlanActive(Guid customerPlanId, Guid clientId, bool isActive);
|
|
|
|
Task<bool> DeleteCustomerPlan(Guid customerPlanId, bool softDelete = true);
|
|
}
|
|
}
|