package com.yaoyuan.jiscuss.service;

/**
 * Vote (like / dislike) service for discussions and posts.
 *
 * <p>Toggle semantics:
 * <ul>
 *   <li>If the user has not voted → create a new vote with the requested action.</li>
 *   <li>If the user voted with the same action → cancel the vote (toggle off).</li>
 *   <li>If the user voted with a different action → switch the vote.</li>
 * </ul>
 *
 * @return the user's current action after the operation: "like", "dislike", or "none" (cancelled)
 */
public interface ILikeCollectService {

    /** Vote on a discussion. {@code action} must be "like" or "dislike". */
    String voteDiscussion(Integer userId, Integer discussionId, String action);

    /** Vote on a post (reply). {@code action} must be "like" or "dislike". */
    String votePost(Integer userId, Integer postId, String action);
}
