using System.Collections.Generic;
using System.Data.Common;
using System.Threading.Tasks;
using GB5Shared.DTO.Framework.Login;
using GoodBooks.PAY.PAYDAL.DTO.Loyalty;
namespace GoodBooks.PAY.PAYDAL.CustomCode.Loyalty
{
///
/// Data-access contract for MLOYALTYTIER.
///
public interface ILoyaltyTierDAL
{
///
/// Returns all tiers for a loyalty program, ordered by SLNO ascending.
///
Task> GetTiersByProgram(int programId, LoginDTO login);
///
/// Inserts a single tier row within the supplied transaction.
/// Returns rows affected.
///
Task InsertLoyaltyTier(LoyaltyTierDTO dto, LoginDTO login, DbTransaction? tx);
///
/// Returns the highest tier the customer qualifies for based on their lifetime points,
/// or null if no tier threshold has been reached.
/// Used during tier-upgrade evaluation after a new earn entry is posted.
///
Task GetTierForPoints(int programId, decimal lifetimePoints, LoginDTO login);
}
}