package com.storycove.dto;

import java.time.LocalDateTime;
import java.util.List;
import java.util.UUID;

/**
 * Story DTO specifically for reading view.
 * Contains contentHtml but excludes contentPlain for performance.
 */
public class StoryReadingDto {
    
    private UUID id;
    private String title;
    private String summary;
    private String description;
    private String contentHtml;  // For reading - includes HTML
    // contentPlain excluded for performance
    private String sourceUrl;
    private String coverPath;
    private Integer wordCount;
    private Integer rating;
    private Integer volume;
    
    // Reading progress fields
    private Boolean isRead;
    private Integer readingPosition;
    private Integer readingProgressPercentage; // Pre-calculated percentage (0-100)
    private LocalDateTime lastReadAt;
    private LocalDateTime lastCompletedAt;

    // Related entities as simple references
    private UUID authorId;
    private String authorName;
    private UUID seriesId;
    private String seriesName;
    private List<TagDto> tags;
    
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    public StoryReadingDto() {}
    
    // Getters and Setters
    public UUID getId() {
        return id;
    }
    
    public void setId(UUID id) {
        this.id = id;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getSummary() {
        return summary;
    }
    
    public void setSummary(String summary) {
        this.summary = summary;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getContentHtml() {
        return contentHtml;
    }
    
    public void setContentHtml(String contentHtml) {
        this.contentHtml = contentHtml;
    }
    
    public String getSourceUrl() {
        return sourceUrl;
    }
    
    public void setSourceUrl(String sourceUrl) {
        this.sourceUrl = sourceUrl;
    }
    
    public String getCoverPath() {
        return coverPath;
    }
    
    public void setCoverPath(String coverPath) {
        this.coverPath = coverPath;
    }
    
    public Integer getWordCount() {
        return wordCount;
    }
    
    public void setWordCount(Integer wordCount) {
        this.wordCount = wordCount;
    }
    
    public Integer getRating() {
        return rating;
    }
    
    public void setRating(Integer rating) {
        this.rating = rating;
    }
    
    public Integer getVolume() {
        return volume;
    }
    
    public void setVolume(Integer volume) {
        this.volume = volume;
    }
    
    public Boolean getIsRead() {
        return isRead;
    }
    
    public void setIsRead(Boolean isRead) {
        this.isRead = isRead;
    }
    
    public Integer getReadingPosition() {
        return readingPosition;
    }
    
    public void setReadingPosition(Integer readingPosition) {
        this.readingPosition = readingPosition;
    }

    public Integer getReadingProgressPercentage() {
        return readingProgressPercentage;
    }

    public void setReadingProgressPercentage(Integer readingProgressPercentage) {
        this.readingProgressPercentage = readingProgressPercentage;
    }

    public LocalDateTime getLastReadAt() {
        return lastReadAt;
    }
    
    public void setLastReadAt(LocalDateTime lastReadAt) {
        this.lastReadAt = lastReadAt;
    }

    public LocalDateTime getLastCompletedAt() {
        return lastCompletedAt;
    }

    public void setLastCompletedAt(LocalDateTime lastCompletedAt) {
        this.lastCompletedAt = lastCompletedAt;
    }

    public UUID getAuthorId() {
        return authorId;
    }
    
    public void setAuthorId(UUID authorId) {
        this.authorId = authorId;
    }
    
    public String getAuthorName() {
        return authorName;
    }
    
    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }
    
    public UUID getSeriesId() {
        return seriesId;
    }
    
    public void setSeriesId(UUID seriesId) {
        this.seriesId = seriesId;
    }
    
    public String getSeriesName() {
        return seriesName;
    }
    
    public void setSeriesName(String seriesName) {
        this.seriesName = seriesName;
    }
    
    public List<TagDto> getTags() {
        return tags;
    }
    
    public void setTags(List<TagDto> tags) {
        this.tags = tags;
    }
    
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
}