188 lines
5.1 KiB
Java
188 lines
5.1 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.muse.dto.PlanningSection;
|
|
import com.muse.dto.PlanningStructureSourceSnapshot;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
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;
|
|
|
|
/**
|
|
* 作品规划结构
|
|
*/
|
|
|
|
@Schema(name = "PlanningStructure", description = "作品规划结构")
|
|
@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 PlanningStructure implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID workId;
|
|
|
|
private Integer revision;
|
|
|
|
@Valid
|
|
private List<@Valid PlanningSection> sections = new ArrayList<>();
|
|
|
|
private @Nullable PlanningStructureSourceSnapshot sourceSnapshot;
|
|
|
|
public PlanningStructure() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public PlanningStructure(UUID workId, Integer revision) {
|
|
this.workId = workId;
|
|
this.revision = revision;
|
|
}
|
|
|
|
public PlanningStructure workId(UUID workId) {
|
|
this.workId = workId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get workId
|
|
* @return workId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "workId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("workId")
|
|
public UUID getWorkId() {
|
|
return workId;
|
|
}
|
|
|
|
@JsonProperty("workId")
|
|
public void setWorkId(UUID workId) {
|
|
this.workId = workId;
|
|
}
|
|
|
|
public PlanningStructure revision(Integer revision) {
|
|
this.revision = revision;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 规划数据 revision
|
|
* @return revision
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "revision", description = "规划数据 revision", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("revision")
|
|
public Integer getRevision() {
|
|
return revision;
|
|
}
|
|
|
|
@JsonProperty("revision")
|
|
public void setRevision(Integer revision) {
|
|
this.revision = revision;
|
|
}
|
|
|
|
public PlanningStructure sections(List<@Valid PlanningSection> sections) {
|
|
this.sections = sections;
|
|
return this;
|
|
}
|
|
|
|
public PlanningStructure addSectionsItem(PlanningSection sectionsItem) {
|
|
if (this.sections == null) {
|
|
this.sections = new ArrayList<>();
|
|
}
|
|
this.sections.add(sectionsItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 已确认的规划项列表
|
|
* @return sections
|
|
*/
|
|
@Valid
|
|
@Schema(name = "sections", description = "已确认的规划项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sections")
|
|
public List<@Valid PlanningSection> getSections() {
|
|
return sections;
|
|
}
|
|
|
|
@JsonProperty("sections")
|
|
public void setSections(List<@Valid PlanningSection> sections) {
|
|
this.sections = sections;
|
|
}
|
|
|
|
public PlanningStructure sourceSnapshot(@Nullable PlanningStructureSourceSnapshot sourceSnapshot) {
|
|
this.sourceSnapshot = sourceSnapshot;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get sourceSnapshot
|
|
* @return sourceSnapshot
|
|
*/
|
|
@Valid
|
|
@Schema(name = "sourceSnapshot", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceSnapshot")
|
|
public @Nullable PlanningStructureSourceSnapshot getSourceSnapshot() {
|
|
return sourceSnapshot;
|
|
}
|
|
|
|
@JsonProperty("sourceSnapshot")
|
|
public void setSourceSnapshot(@Nullable PlanningStructureSourceSnapshot sourceSnapshot) {
|
|
this.sourceSnapshot = sourceSnapshot;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
PlanningStructure planningStructure = (PlanningStructure) o;
|
|
return Objects.equals(this.workId, planningStructure.workId) &&
|
|
Objects.equals(this.revision, planningStructure.revision) &&
|
|
Objects.equals(this.sections, planningStructure.sections) &&
|
|
Objects.equals(this.sourceSnapshot, planningStructure.sourceSnapshot);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(workId, revision, sections, sourceSnapshot);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class PlanningStructure {\n");
|
|
sb.append(" workId: ").append(toIndentedString(workId)).append("\n");
|
|
sb.append(" revision: ").append(toIndentedString(revision)).append("\n");
|
|
sb.append(" sections: ").append(toIndentedString(sections)).append("\n");
|
|
sb.append(" sourceSnapshot: ").append(toIndentedString(sourceSnapshot)).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 ");
|
|
}
|
|
}
|
|
|