package com.pingcap.community.blogserver.event;

import com.pingcap.community.blogserver.entity.Comment;
import com.pingcap.community.blogserver.entity.Post;
import com.pingcap.community.blogserver.entity.User;
import com.pingcap.community.blogserver.event.payload.PostCommentEventPayload;
import com.pingcap.community.blogserver.support.webhook.WebhookEvent;

public class PostCommentEvent extends WebhookEvent<PostCommentEventPayload> {

  public static final String EVENT_TYPE = "post-comment";

  public PostCommentEvent(Object source, Post post, User operator, Comment comment) {
    super(
        source,
        EVENT_TYPE,
        new PostCommentEventPayload(post, operator, comment),
        PostCommentEventPayload.WebhookView.class);
  }
}
