Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
419 lines
11 KiB
Java
419 lines
11 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.net.URI;
|
|
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;
|
|
|
|
/**
|
|
* 个人资料
|
|
*/
|
|
|
|
@Schema(name = "AccountProfile", description = "个人资料")
|
|
@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 AccountProfile implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String userId;
|
|
|
|
private String nickname;
|
|
|
|
private @Nullable URI avatar;
|
|
|
|
private @Nullable String publicPenName;
|
|
|
|
private @Nullable String emailMasked;
|
|
|
|
private @Nullable String phoneMasked;
|
|
|
|
private Boolean emailVerified;
|
|
|
|
private Boolean phoneVerified;
|
|
|
|
/**
|
|
* 账号状态
|
|
*/
|
|
public enum StatusEnum {
|
|
ACTIVE("active"),
|
|
|
|
RESTRICTED("restricted"),
|
|
|
|
SUSPENDED("suspended");
|
|
|
|
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;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime createdAt;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime lastProfileUpdatedAt;
|
|
|
|
private @Nullable Integer version;
|
|
|
|
public AccountProfile() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AccountProfile(String userId, String nickname, Boolean emailVerified, Boolean phoneVerified, StatusEnum status) {
|
|
this.userId = userId;
|
|
this.nickname = nickname;
|
|
this.emailVerified = emailVerified;
|
|
this.phoneVerified = phoneVerified;
|
|
this.status = status;
|
|
}
|
|
|
|
public AccountProfile 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 AccountProfile nickname(String nickname) {
|
|
this.nickname = nickname;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 昵称
|
|
* @return nickname
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "nickname", description = "昵称", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("nickname")
|
|
public String getNickname() {
|
|
return nickname;
|
|
}
|
|
|
|
@JsonProperty("nickname")
|
|
public void setNickname(String nickname) {
|
|
this.nickname = nickname;
|
|
}
|
|
|
|
public AccountProfile avatar(@Nullable URI avatar) {
|
|
this.avatar = avatar;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 头像 URL
|
|
* @return avatar
|
|
*/
|
|
@Valid
|
|
@Schema(name = "avatar", description = "头像 URL", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("avatar")
|
|
public @Nullable URI getAvatar() {
|
|
return avatar;
|
|
}
|
|
|
|
@JsonProperty("avatar")
|
|
public void setAvatar(@Nullable URI avatar) {
|
|
this.avatar = avatar;
|
|
}
|
|
|
|
public AccountProfile publicPenName(@Nullable String publicPenName) {
|
|
this.publicPenName = publicPenName;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 公开署名
|
|
* @return publicPenName
|
|
*/
|
|
|
|
@Schema(name = "publicPenName", description = "公开署名", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("publicPenName")
|
|
public @Nullable String getPublicPenName() {
|
|
return publicPenName;
|
|
}
|
|
|
|
@JsonProperty("publicPenName")
|
|
public void setPublicPenName(@Nullable String publicPenName) {
|
|
this.publicPenName = publicPenName;
|
|
}
|
|
|
|
public AccountProfile emailMasked(@Nullable String emailMasked) {
|
|
this.emailMasked = emailMasked;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 邮箱脱敏值
|
|
* @return emailMasked
|
|
*/
|
|
|
|
@Schema(name = "emailMasked", description = "邮箱脱敏值", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("emailMasked")
|
|
public @Nullable String getEmailMasked() {
|
|
return emailMasked;
|
|
}
|
|
|
|
@JsonProperty("emailMasked")
|
|
public void setEmailMasked(@Nullable String emailMasked) {
|
|
this.emailMasked = emailMasked;
|
|
}
|
|
|
|
public AccountProfile phoneMasked(@Nullable String phoneMasked) {
|
|
this.phoneMasked = phoneMasked;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 手机号脱敏值
|
|
* @return phoneMasked
|
|
*/
|
|
|
|
@Schema(name = "phoneMasked", description = "手机号脱敏值", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("phoneMasked")
|
|
public @Nullable String getPhoneMasked() {
|
|
return phoneMasked;
|
|
}
|
|
|
|
@JsonProperty("phoneMasked")
|
|
public void setPhoneMasked(@Nullable String phoneMasked) {
|
|
this.phoneMasked = phoneMasked;
|
|
}
|
|
|
|
public AccountProfile emailVerified(Boolean emailVerified) {
|
|
this.emailVerified = emailVerified;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 邮箱是否已验证
|
|
* @return emailVerified
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "emailVerified", description = "邮箱是否已验证", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("emailVerified")
|
|
public Boolean getEmailVerified() {
|
|
return emailVerified;
|
|
}
|
|
|
|
@JsonProperty("emailVerified")
|
|
public void setEmailVerified(Boolean emailVerified) {
|
|
this.emailVerified = emailVerified;
|
|
}
|
|
|
|
public AccountProfile phoneVerified(Boolean phoneVerified) {
|
|
this.phoneVerified = phoneVerified;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 手机号是否已验证
|
|
* @return phoneVerified
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "phoneVerified", description = "手机号是否已验证", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("phoneVerified")
|
|
public Boolean getPhoneVerified() {
|
|
return phoneVerified;
|
|
}
|
|
|
|
@JsonProperty("phoneVerified")
|
|
public void setPhoneVerified(Boolean phoneVerified) {
|
|
this.phoneVerified = phoneVerified;
|
|
}
|
|
|
|
public AccountProfile status(StatusEnum status) {
|
|
this.status = status;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 账号状态
|
|
* @return status
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "status", description = "账号状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("status")
|
|
public StatusEnum getStatus() {
|
|
return status;
|
|
}
|
|
|
|
@JsonProperty("status")
|
|
public void setStatus(StatusEnum status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public AccountProfile createdAt(@Nullable OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 注册时间
|
|
* @return createdAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "createdAt", description = "注册时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("createdAt")
|
|
public @Nullable OffsetDateTime getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
@JsonProperty("createdAt")
|
|
public void setCreatedAt(@Nullable OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public AccountProfile lastProfileUpdatedAt(@Nullable OffsetDateTime lastProfileUpdatedAt) {
|
|
this.lastProfileUpdatedAt = lastProfileUpdatedAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 最近资料更新时间
|
|
* @return lastProfileUpdatedAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "lastProfileUpdatedAt", description = "最近资料更新时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("lastProfileUpdatedAt")
|
|
public @Nullable OffsetDateTime getLastProfileUpdatedAt() {
|
|
return lastProfileUpdatedAt;
|
|
}
|
|
|
|
@JsonProperty("lastProfileUpdatedAt")
|
|
public void setLastProfileUpdatedAt(@Nullable OffsetDateTime lastProfileUpdatedAt) {
|
|
this.lastProfileUpdatedAt = lastProfileUpdatedAt;
|
|
}
|
|
|
|
public AccountProfile version(@Nullable Integer version) {
|
|
this.version = version;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 资料版本号(乐观锁)
|
|
* @return version
|
|
*/
|
|
|
|
@Schema(name = "version", description = "资料版本号(乐观锁)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("version")
|
|
public @Nullable Integer getVersion() {
|
|
return version;
|
|
}
|
|
|
|
@JsonProperty("version")
|
|
public void setVersion(@Nullable Integer version) {
|
|
this.version = version;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
AccountProfile accountProfile = (AccountProfile) o;
|
|
return Objects.equals(this.userId, accountProfile.userId) &&
|
|
Objects.equals(this.nickname, accountProfile.nickname) &&
|
|
Objects.equals(this.avatar, accountProfile.avatar) &&
|
|
Objects.equals(this.publicPenName, accountProfile.publicPenName) &&
|
|
Objects.equals(this.emailMasked, accountProfile.emailMasked) &&
|
|
Objects.equals(this.phoneMasked, accountProfile.phoneMasked) &&
|
|
Objects.equals(this.emailVerified, accountProfile.emailVerified) &&
|
|
Objects.equals(this.phoneVerified, accountProfile.phoneVerified) &&
|
|
Objects.equals(this.status, accountProfile.status) &&
|
|
Objects.equals(this.createdAt, accountProfile.createdAt) &&
|
|
Objects.equals(this.lastProfileUpdatedAt, accountProfile.lastProfileUpdatedAt) &&
|
|
Objects.equals(this.version, accountProfile.version);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(userId, nickname, avatar, publicPenName, emailMasked, phoneMasked, emailVerified, phoneVerified, status, createdAt, lastProfileUpdatedAt, version);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AccountProfile {\n");
|
|
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
|
|
sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n");
|
|
sb.append(" avatar: ").append(toIndentedString(avatar)).append("\n");
|
|
sb.append(" publicPenName: ").append(toIndentedString(publicPenName)).append("\n");
|
|
sb.append(" emailMasked: ").append(toIndentedString(emailMasked)).append("\n");
|
|
sb.append(" phoneMasked: ").append(toIndentedString(phoneMasked)).append("\n");
|
|
sb.append(" emailVerified: ").append(toIndentedString(emailVerified)).append("\n");
|
|
sb.append(" phoneVerified: ").append(toIndentedString(phoneVerified)).append("\n");
|
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
|
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
|
|
sb.append(" lastProfileUpdatedAt: ").append(toIndentedString(lastProfileUpdatedAt)).append("\n");
|
|
sb.append(" version: ").append(toIndentedString(version)).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 ");
|
|
}
|
|
}
|
|
|