package com.storycove.event;

import org.springframework.context.ApplicationEvent;

import java.util.UUID;

/**
 * Event published when a story's content is created or updated
 */
public class StoryContentUpdatedEvent extends ApplicationEvent {

    private final UUID storyId;
    private final String contentHtml;
    private final boolean isNewStory;

    public StoryContentUpdatedEvent(Object source, UUID storyId, String contentHtml, boolean isNewStory) {
        super(source);
        this.storyId = storyId;
        this.contentHtml = contentHtml;
        this.isNewStory = isNewStory;
    }

    public UUID getStoryId() {
        return storyId;
    }

    public String getContentHtml() {
        return contentHtml;
    }

    public boolean isNewStory() {
        return isNewStory;
    }
}