Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
267 lines
7.3 KiB
Java
267 lines
7.3 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 java.time.OffsetDateTime;
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
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;
|
|
|
|
/**
|
|
* New-API 网关用户绑定摘要
|
|
*/
|
|
|
|
@Schema(name = "NewApiBindingSummary", description = "New-API 网关用户绑定摘要")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T15:05:54.603829+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class NewApiBindingSummary implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String userId;
|
|
|
|
private @Nullable String nickname;
|
|
|
|
/**
|
|
* 绑定状态
|
|
*/
|
|
public enum BindingStatusEnum {
|
|
BOUND("bound"),
|
|
|
|
UNBOUND("unbound"),
|
|
|
|
SYNC_FAILED("sync_failed"),
|
|
|
|
PENDING("pending");
|
|
|
|
private final String value;
|
|
|
|
BindingStatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static BindingStatusEnum fromValue(String value) {
|
|
for (BindingStatusEnum b : BindingStatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private BindingStatusEnum bindingStatus;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime boundAt;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime lastSyncAt;
|
|
|
|
private @Nullable String syncErrorMessage;
|
|
|
|
public NewApiBindingSummary() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public NewApiBindingSummary(String userId, BindingStatusEnum bindingStatus) {
|
|
this.userId = userId;
|
|
this.bindingStatus = bindingStatus;
|
|
}
|
|
|
|
public NewApiBindingSummary userId(String userId) {
|
|
this.userId = userId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 用户 ID
|
|
* @return userId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "userId", description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("userId")
|
|
public String getUserId() {
|
|
return userId;
|
|
}
|
|
|
|
@JsonProperty("userId")
|
|
public void setUserId(String userId) {
|
|
this.userId = userId;
|
|
}
|
|
|
|
public NewApiBindingSummary nickname(@Nullable String nickname) {
|
|
this.nickname = nickname;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 用户昵称
|
|
* @return nickname
|
|
*/
|
|
|
|
@Schema(name = "nickname", description = "用户昵称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("nickname")
|
|
public @Nullable String getNickname() {
|
|
return nickname;
|
|
}
|
|
|
|
@JsonProperty("nickname")
|
|
public void setNickname(@Nullable String nickname) {
|
|
this.nickname = nickname;
|
|
}
|
|
|
|
public NewApiBindingSummary bindingStatus(BindingStatusEnum bindingStatus) {
|
|
this.bindingStatus = bindingStatus;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 绑定状态
|
|
* @return bindingStatus
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "bindingStatus", description = "绑定状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("bindingStatus")
|
|
public BindingStatusEnum getBindingStatus() {
|
|
return bindingStatus;
|
|
}
|
|
|
|
@JsonProperty("bindingStatus")
|
|
public void setBindingStatus(BindingStatusEnum bindingStatus) {
|
|
this.bindingStatus = bindingStatus;
|
|
}
|
|
|
|
public NewApiBindingSummary boundAt(@Nullable OffsetDateTime boundAt) {
|
|
this.boundAt = boundAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 绑定时间
|
|
* @return boundAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "boundAt", description = "绑定时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("boundAt")
|
|
public @Nullable OffsetDateTime getBoundAt() {
|
|
return boundAt;
|
|
}
|
|
|
|
@JsonProperty("boundAt")
|
|
public void setBoundAt(@Nullable OffsetDateTime boundAt) {
|
|
this.boundAt = boundAt;
|
|
}
|
|
|
|
public NewApiBindingSummary lastSyncAt(@Nullable OffsetDateTime lastSyncAt) {
|
|
this.lastSyncAt = lastSyncAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 最近同步时间
|
|
* @return lastSyncAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "lastSyncAt", description = "最近同步时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("lastSyncAt")
|
|
public @Nullable OffsetDateTime getLastSyncAt() {
|
|
return lastSyncAt;
|
|
}
|
|
|
|
@JsonProperty("lastSyncAt")
|
|
public void setLastSyncAt(@Nullable OffsetDateTime lastSyncAt) {
|
|
this.lastSyncAt = lastSyncAt;
|
|
}
|
|
|
|
public NewApiBindingSummary syncErrorMessage(@Nullable String syncErrorMessage) {
|
|
this.syncErrorMessage = syncErrorMessage;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 同步失败原因(仅失败时返回)
|
|
* @return syncErrorMessage
|
|
*/
|
|
|
|
@Schema(name = "syncErrorMessage", description = "同步失败原因(仅失败时返回)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("syncErrorMessage")
|
|
public @Nullable String getSyncErrorMessage() {
|
|
return syncErrorMessage;
|
|
}
|
|
|
|
@JsonProperty("syncErrorMessage")
|
|
public void setSyncErrorMessage(@Nullable String syncErrorMessage) {
|
|
this.syncErrorMessage = syncErrorMessage;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
NewApiBindingSummary newApiBindingSummary = (NewApiBindingSummary) o;
|
|
return Objects.equals(this.userId, newApiBindingSummary.userId) &&
|
|
Objects.equals(this.nickname, newApiBindingSummary.nickname) &&
|
|
Objects.equals(this.bindingStatus, newApiBindingSummary.bindingStatus) &&
|
|
Objects.equals(this.boundAt, newApiBindingSummary.boundAt) &&
|
|
Objects.equals(this.lastSyncAt, newApiBindingSummary.lastSyncAt) &&
|
|
Objects.equals(this.syncErrorMessage, newApiBindingSummary.syncErrorMessage);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(userId, nickname, bindingStatus, boundAt, lastSyncAt, syncErrorMessage);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class NewApiBindingSummary {\n");
|
|
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
|
|
sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n");
|
|
sb.append(" bindingStatus: ").append(toIndentedString(bindingStatus)).append("\n");
|
|
sb.append(" boundAt: ").append(toIndentedString(boundAt)).append("\n");
|
|
sb.append(" lastSyncAt: ").append(toIndentedString(lastSyncAt)).append("\n");
|
|
sb.append(" syncErrorMessage: ").append(toIndentedString(syncErrorMessage)).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 ");
|
|
}
|
|
}
|
|
|