using Nop.Core; using Nop.Core.Domain.Polls; namespace Nop.Services.Polls; /// /// Poll service interface /// public partial interface IPollService { /// /// Gets a poll /// /// The poll identifier /// /// A task that represents the asynchronous operation /// The task result contains the poll /// Task GetPollByIdAsync(int pollId); /// /// Gets polls /// /// The store identifier; pass 0 to load all records /// Language identifier; pass 0 to load all records /// Whether to show hidden records (not published, not started and expired) /// Retrieve only shown on home page polls /// The poll system keyword; pass null to load all records /// Page index /// Page size /// /// A task that represents the asynchronous operation /// The task result contains the polls /// Task> GetPollsAsync(int storeId, int languageId = 0, bool showHidden = false, bool loadShownOnHomepageOnly = false, string systemKeyword = null, int pageIndex = 0, int pageSize = int.MaxValue); /// /// Deletes a poll /// /// The poll /// A task that represents the asynchronous operation Task DeletePollAsync(Poll poll); /// /// Inserts a poll /// /// Poll /// A task that represents the asynchronous operation Task InsertPollAsync(Poll poll); /// /// Updates the poll /// /// Poll /// A task that represents the asynchronous operation Task UpdatePollAsync(Poll poll); /// /// Gets a poll answer /// /// Poll answer identifier /// /// A task that represents the asynchronous operation /// The task result contains the poll answer /// Task GetPollAnswerByIdAsync(int pollAnswerId); /// /// Gets a poll answers by parent poll /// /// The poll identifier /// Poll answer /// Page index /// Page size /// A task that represents the asynchronous operation Task> GetPollAnswerByPollAsync(int pollId, int pageIndex = 0, int pageSize = int.MaxValue); /// /// Deletes a poll answer /// /// Poll answer /// A task that represents the asynchronous operation Task DeletePollAnswerAsync(PollAnswer pollAnswer); /// /// Inserts a poll answer /// /// Poll answer /// A task that represents the asynchronous operation Task InsertPollAnswerAsync(PollAnswer pollAnswer); /// /// Updates the poll answer /// /// Poll answer /// A task that represents the asynchronous operation Task UpdatePollAnswerAsync(PollAnswer pollAnswer); /// /// Gets a value indicating whether customer already voted for this poll /// /// Poll identifier /// Customer identifier /// /// A task that represents the asynchronous operation /// The task result contains the result /// Task AlreadyVotedAsync(int pollId, int customerId); /// /// Inserts a poll voting record /// /// Voting record /// A task that represents the asynchronous operation Task InsertPollVotingRecordAsync(PollVotingRecord pollVotingRecord); /// /// Gets a poll voting records by parent answer /// /// Poll answer identifier /// Poll answer /// Page index /// Page size /// A task that represents the asynchronous operation Task> GetPollVotingRecordsByPollAnswerAsync(int pollAnswerId, int pageIndex = 0, int pageSize = int.MaxValue); }