using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ContactManagementSystem.Models;

namespace ContactManagementSystem.Data.Repositories
{
    /// <summary>
    /// Interface defining the contract for ContactNote repository operations
    /// Demonstrates: Repository Pattern for related entities
    /// </summary>
    public interface IContactNoteRepository : IDisposable
    {
        Task<List<ContactNote>> GetAllAsync();

        Task<ContactNote> GetByIdAsync(int id);

       Task<ContactNote> AddAsync(ContactNote note);

       Task<bool> UpdateAsync(ContactNote note);

       Task<bool> DeleteAsync(int id);

        #region Query Operations

        Task<List<ContactNote>> GetByContactIdAsync(int contactId);

        Task<List<ContactNote>> GetByCategoryAsync(string category);

        Task<List<ContactNote>> SearchAsync(string searchTerm);

       Task<List<ContactNote>> GetRecentAsync(int days);

       Task<List<ContactNote>> GetNotesAfterDateAsync(DateTime date);

        #endregion

        #region Utility Operations

        Task<int> GetCountByContactAsync(int contactId);

        Task<int> GetCountAsync();

        #endregion
    }
}
