341 lines
9.0 KiB
Java
341 lines
9.0 KiB
Java
package com.muse.dto;
|
|
|
|
import java.net.URI;
|
|
import java.util.Objects;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
|
import com.muse.dto.ChapterParseResultQualityResult;
|
|
import java.util.UUID;
|
|
import org.springframework.lang.Nullable;
|
|
import java.io.Serializable;
|
|
import java.time.OffsetDateTime;
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.constraints.*;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
|
import java.util.*;
|
|
import jakarta.annotation.Generated;
|
|
|
|
/**
|
|
* AI Orchestration owner 提供给 Content/Work 的章节解析结果投影
|
|
*/
|
|
|
|
@Schema(name = "ChapterParseResult", description = "AI Orchestration owner 提供给 Content/Work 的章节解析结果投影")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class ChapterParseResult implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID id;
|
|
|
|
private UUID jobId;
|
|
|
|
private String title;
|
|
|
|
private @Nullable Integer sortOrder;
|
|
|
|
private @Nullable String contentPreview;
|
|
|
|
private @Nullable Integer wordCount;
|
|
|
|
/**
|
|
* 审阅状态: pending_review - 待审阅 confirmed - 已确认 rejected - 已驳回
|
|
*/
|
|
public enum StatusEnum {
|
|
PENDING_REVIEW("pending_review"),
|
|
|
|
CONFIRMED("confirmed"),
|
|
|
|
REJECTED("rejected");
|
|
|
|
private final String value;
|
|
|
|
StatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static StatusEnum fromValue(String value) {
|
|
for (StatusEnum b : StatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private StatusEnum status;
|
|
|
|
private Integer revision;
|
|
|
|
private @Nullable ChapterParseResultQualityResult qualityResult;
|
|
|
|
public ChapterParseResult() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public ChapterParseResult(UUID id, UUID jobId, String title, StatusEnum status, Integer revision) {
|
|
this.id = id;
|
|
this.jobId = jobId;
|
|
this.title = title;
|
|
this.status = status;
|
|
this.revision = revision;
|
|
}
|
|
|
|
public ChapterParseResult id(UUID id) {
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get id
|
|
* @return id
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("id")
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
|
|
@JsonProperty("id")
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public ChapterParseResult jobId(UUID jobId) {
|
|
this.jobId = jobId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get jobId
|
|
* @return jobId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "jobId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("jobId")
|
|
public UUID getJobId() {
|
|
return jobId;
|
|
}
|
|
|
|
@JsonProperty("jobId")
|
|
public void setJobId(UUID jobId) {
|
|
this.jobId = jobId;
|
|
}
|
|
|
|
public ChapterParseResult title(String title) {
|
|
this.title = title;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* AI 检测到的章节标题
|
|
* @return title
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "title", description = "AI 检测到的章节标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("title")
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
@JsonProperty("title")
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
public ChapterParseResult sortOrder(@Nullable Integer sortOrder) {
|
|
this.sortOrder = sortOrder;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get sortOrder
|
|
* @return sortOrder
|
|
*/
|
|
|
|
@Schema(name = "sortOrder", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sortOrder")
|
|
public @Nullable Integer getSortOrder() {
|
|
return sortOrder;
|
|
}
|
|
|
|
@JsonProperty("sortOrder")
|
|
public void setSortOrder(@Nullable Integer sortOrder) {
|
|
this.sortOrder = sortOrder;
|
|
}
|
|
|
|
public ChapterParseResult contentPreview(@Nullable String contentPreview) {
|
|
this.contentPreview = contentPreview;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 内容预览(截取摘要,非全文)
|
|
* @return contentPreview
|
|
*/
|
|
|
|
@Schema(name = "contentPreview", description = "内容预览(截取摘要,非全文)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("contentPreview")
|
|
public @Nullable String getContentPreview() {
|
|
return contentPreview;
|
|
}
|
|
|
|
@JsonProperty("contentPreview")
|
|
public void setContentPreview(@Nullable String contentPreview) {
|
|
this.contentPreview = contentPreview;
|
|
}
|
|
|
|
public ChapterParseResult wordCount(@Nullable Integer wordCount) {
|
|
this.wordCount = wordCount;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get wordCount
|
|
* @return wordCount
|
|
*/
|
|
|
|
@Schema(name = "wordCount", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("wordCount")
|
|
public @Nullable Integer getWordCount() {
|
|
return wordCount;
|
|
}
|
|
|
|
@JsonProperty("wordCount")
|
|
public void setWordCount(@Nullable Integer wordCount) {
|
|
this.wordCount = wordCount;
|
|
}
|
|
|
|
public ChapterParseResult status(StatusEnum status) {
|
|
this.status = status;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 审阅状态: pending_review - 待审阅 confirmed - 已确认 rejected - 已驳回
|
|
* @return status
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "status", description = "审阅状态: pending_review - 待审阅 confirmed - 已确认 rejected - 已驳回 ", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("status")
|
|
public StatusEnum getStatus() {
|
|
return status;
|
|
}
|
|
|
|
@JsonProperty("status")
|
|
public void setStatus(StatusEnum status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public ChapterParseResult revision(Integer revision) {
|
|
this.revision = revision;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get revision
|
|
* @return revision
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "revision", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("revision")
|
|
public Integer getRevision() {
|
|
return revision;
|
|
}
|
|
|
|
@JsonProperty("revision")
|
|
public void setRevision(Integer revision) {
|
|
this.revision = revision;
|
|
}
|
|
|
|
public ChapterParseResult qualityResult(@Nullable ChapterParseResultQualityResult qualityResult) {
|
|
this.qualityResult = qualityResult;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get qualityResult
|
|
* @return qualityResult
|
|
*/
|
|
@Valid
|
|
@Schema(name = "qualityResult", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("qualityResult")
|
|
public @Nullable ChapterParseResultQualityResult getQualityResult() {
|
|
return qualityResult;
|
|
}
|
|
|
|
@JsonProperty("qualityResult")
|
|
public void setQualityResult(@Nullable ChapterParseResultQualityResult qualityResult) {
|
|
this.qualityResult = qualityResult;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
ChapterParseResult chapterParseResult = (ChapterParseResult) o;
|
|
return Objects.equals(this.id, chapterParseResult.id) &&
|
|
Objects.equals(this.jobId, chapterParseResult.jobId) &&
|
|
Objects.equals(this.title, chapterParseResult.title) &&
|
|
Objects.equals(this.sortOrder, chapterParseResult.sortOrder) &&
|
|
Objects.equals(this.contentPreview, chapterParseResult.contentPreview) &&
|
|
Objects.equals(this.wordCount, chapterParseResult.wordCount) &&
|
|
Objects.equals(this.status, chapterParseResult.status) &&
|
|
Objects.equals(this.revision, chapterParseResult.revision) &&
|
|
Objects.equals(this.qualityResult, chapterParseResult.qualityResult);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(id, jobId, title, sortOrder, contentPreview, wordCount, status, revision, qualityResult);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class ChapterParseResult {\n");
|
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
|
sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n");
|
|
sb.append(" title: ").append(toIndentedString(title)).append("\n");
|
|
sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n");
|
|
sb.append(" contentPreview: ").append(toIndentedString(contentPreview)).append("\n");
|
|
sb.append(" wordCount: ").append(toIndentedString(wordCount)).append("\n");
|
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
|
sb.append(" revision: ").append(toIndentedString(revision)).append("\n");
|
|
sb.append(" qualityResult: ").append(toIndentedString(qualityResult)).append("\n");
|
|
sb.append("}");
|
|
return sb.toString();
|
|
}
|
|
|
|
/**
|
|
* Convert the given object to string with each line indented by 4 spaces
|
|
* (except the first line).
|
|
*/
|
|
private String toIndentedString(@Nullable Object o) {
|
|
return o == null ? "null" : o.toString().replace("\n", "\n ");
|
|
}
|
|
}
|
|
|