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 MLOYALTYEARNCFG.
///
public interface ILoyaltyEarnCfgDAL
{
///
/// Returns all currently active earn rules for a loyalty program.
/// "Active" is defined by STATUS=1 and date range coverage — see LoyaltyEarnCfgQB for details.
/// Results are ordered by RULETYPE DESC (highest specificity first).
///
Task> GetEarnCfgsByProgram(int programId, LoginDTO login);
///
/// Inserts a new earn rule within the supplied transaction.
/// Returns rows affected.
///
Task InsertLoyaltyEarnCfg(LoyaltyEarnCfgDTO dto, LoginDTO login, DbTransaction? tx);
///
/// Updates an existing earn rule within the supplied transaction.
/// Returns rows affected.
///
Task UpdateLoyaltyEarnCfg(LoyaltyEarnCfgDTO dto, LoginDTO login, DbTransaction? tx);
}
}