mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-02 10:00:54 +08:00
fix: 后端代码格式化
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import com.openisle.model.ActivityType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* DTO representing an activity without participant details.
|
||||
*/
|
||||
@Data
|
||||
public class ActivityDto {
|
||||
private Long id;
|
||||
private String title;
|
||||
private String icon;
|
||||
private String content;
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
private ActivityType type;
|
||||
private boolean ended;
|
||||
|
||||
private Long id;
|
||||
private String title;
|
||||
private String icon;
|
||||
private String content;
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
private ActivityType type;
|
||||
private boolean ended;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import com.openisle.model.MedalType;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* DTO representing a post or comment author.
|
||||
*/
|
||||
@Data
|
||||
public class AuthorDto {
|
||||
private Long id;
|
||||
private String username;
|
||||
private String avatar;
|
||||
private MedalType displayMedal;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String username;
|
||||
private String avatar;
|
||||
private MedalType displayMedal;
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class CategoryDto {
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
private Long count;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
private Long count;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import lombok.Data;
|
||||
/** Request body for creating or updating a category. */
|
||||
@Data
|
||||
public class CategoryRequest {
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,13 @@ import lombok.Setter;
|
||||
@Getter
|
||||
@Setter
|
||||
public class ChannelDto {
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String avatar;
|
||||
private MessageDto lastMessage;
|
||||
private long memberCount;
|
||||
private boolean joined;
|
||||
private long unreadCount;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String avatar;
|
||||
private MessageDto lastMessage;
|
||||
private long memberCount;
|
||||
private boolean joined;
|
||||
private long unreadCount;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* DTO representing a comment and its nested replies.
|
||||
*/
|
||||
@Data
|
||||
public class CommentDto {
|
||||
private Long id;
|
||||
private String content;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime pinnedAt;
|
||||
private AuthorDto author;
|
||||
private List<CommentDto> replies;
|
||||
private List<ReactionDto> reactions;
|
||||
private int reward;
|
||||
private int pointReward;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String content;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime pinnedAt;
|
||||
private AuthorDto author;
|
||||
private List<CommentDto> replies;
|
||||
private List<ReactionDto> reactions;
|
||||
private int reward;
|
||||
private int pointReward;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/** DTO for comment information in user profiles. */
|
||||
@Data
|
||||
public class CommentInfoDto {
|
||||
private Long id;
|
||||
private String content;
|
||||
private LocalDateTime createdAt;
|
||||
private PostMetaDto post;
|
||||
private ParentCommentDto parentComment;
|
||||
|
||||
private Long id;
|
||||
private String content;
|
||||
private LocalDateTime createdAt;
|
||||
private PostMetaDto post;
|
||||
private ParentCommentDto parentComment;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommentMedalDto extends MedalDto {
|
||||
private long currentCommentCount;
|
||||
private long targetCommentCount;
|
||||
|
||||
private long currentCommentCount;
|
||||
private long targetCommentCount;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request body for creating or replying to a comment. */
|
||||
@Data
|
||||
public class CommentRequest {
|
||||
private String content;
|
||||
private String captcha;
|
||||
|
||||
private String content;
|
||||
private String captcha;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,9 @@ import lombok.Data;
|
||||
/** DTO for site configuration. */
|
||||
@Data
|
||||
public class ConfigDto {
|
||||
private PublishMode publishMode;
|
||||
private PasswordStrength passwordStrength;
|
||||
private Integer aiFormatLimit;
|
||||
private RegisterMode registerMode;
|
||||
|
||||
private PublishMode publishMode;
|
||||
private PasswordStrength passwordStrength;
|
||||
private Integer aiFormatLimit;
|
||||
private RegisterMode registerMode;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ContributorMedalDto extends MedalDto {
|
||||
private long currentContributionLines;
|
||||
private long targetContributionLines;
|
||||
}
|
||||
|
||||
private long currentContributionLines;
|
||||
private long targetContributionLines;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.domain.Page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ConversationDetailDto {
|
||||
private Long id;
|
||||
private String name;
|
||||
private boolean channel;
|
||||
private String avatar;
|
||||
private List<UserSummaryDto> participants;
|
||||
private Page<MessageDto> messages;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private boolean channel;
|
||||
private String avatar;
|
||||
private List<UserSummaryDto> participants;
|
||||
private Page<MessageDto> messages;
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class ConversationDto {
|
||||
private Long id;
|
||||
private String name;
|
||||
private boolean channel;
|
||||
private String avatar;
|
||||
private MessageDto lastMessage;
|
||||
private List<UserSummaryDto> participants;
|
||||
private LocalDateTime createdAt;
|
||||
private long unreadCount;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private boolean channel;
|
||||
private String avatar;
|
||||
private MessageDto lastMessage;
|
||||
private List<UserSummaryDto> participants;
|
||||
private LocalDateTime createdAt;
|
||||
private long unreadCount;
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CreateConversationRequest {
|
||||
private Long recipientId;
|
||||
}
|
||||
|
||||
private Long recipientId;
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CreateConversationResponse {
|
||||
private Long conversationId;
|
||||
}
|
||||
|
||||
private Long conversationId;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ import lombok.Data;
|
||||
/** Request for Discord OAuth login. */
|
||||
@Data
|
||||
public class DiscordLoginRequest {
|
||||
private String code;
|
||||
private String redirectUri;
|
||||
private String inviteToken;
|
||||
|
||||
private String code;
|
||||
private String redirectUri;
|
||||
private String inviteToken;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/** DTO representing a saved draft. */
|
||||
@Data
|
||||
public class DraftDto {
|
||||
private Long id;
|
||||
private String title;
|
||||
private String content;
|
||||
private Long categoryId;
|
||||
private List<Long> tagIds;
|
||||
|
||||
private Long id;
|
||||
private String title;
|
||||
private String content;
|
||||
private Long categoryId;
|
||||
private List<Long> tagIds;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/** Request body for saving a draft. */
|
||||
@Data
|
||||
public class DraftRequest {
|
||||
private String title;
|
||||
private String content;
|
||||
private Long categoryId;
|
||||
private List<Long> tagIds;
|
||||
|
||||
private String title;
|
||||
private String content;
|
||||
private Long categoryId;
|
||||
private List<Long> tagIds;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class FeaturedMedalDto extends MedalDto {
|
||||
private long currentFeaturedCount;
|
||||
private long targetFeaturedCount;
|
||||
}
|
||||
|
||||
private long currentFeaturedCount;
|
||||
private long targetFeaturedCount;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ import lombok.Data;
|
||||
/** Request to trigger a forgot password email. */
|
||||
@Data
|
||||
public class ForgotPasswordRequest {
|
||||
private String email;
|
||||
|
||||
private String email;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ import lombok.Data;
|
||||
/** Request for GitHub OAuth login. */
|
||||
@Data
|
||||
public class GithubLoginRequest {
|
||||
private String code;
|
||||
private String redirectUri;
|
||||
private String inviteToken;
|
||||
|
||||
private String code;
|
||||
private String redirectUri;
|
||||
private String inviteToken;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request for Google OAuth login. */
|
||||
@Data
|
||||
public class GoogleLoginRequest {
|
||||
private String idToken;
|
||||
private String inviteToken;
|
||||
|
||||
private String idToken;
|
||||
private String inviteToken;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ import lombok.Data;
|
||||
/** Request to login. */
|
||||
@Data
|
||||
public class LoginRequest {
|
||||
private String username;
|
||||
private String password;
|
||||
private String captcha;
|
||||
|
||||
private String username;
|
||||
private String password;
|
||||
private String captcha;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/** Metadata for lottery posts. */
|
||||
@Data
|
||||
public class LotteryDto {
|
||||
private String prizeDescription;
|
||||
private String prizeIcon;
|
||||
private int prizeCount;
|
||||
private int pointCost;
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
private List<AuthorDto> participants;
|
||||
private List<AuthorDto> winners;
|
||||
|
||||
private String prizeDescription;
|
||||
private String prizeIcon;
|
||||
private int prizeCount;
|
||||
private int pointCost;
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
private List<AuthorDto> participants;
|
||||
private List<AuthorDto> winners;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request to submit a reason (e.g., for moderation). */
|
||||
@Data
|
||||
public class MakeReasonRequest {
|
||||
private String token;
|
||||
private String reason;
|
||||
|
||||
private String token;
|
||||
private String reason;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MedalDto {
|
||||
private String icon;
|
||||
private String title;
|
||||
private String description;
|
||||
private MedalType type;
|
||||
private boolean completed;
|
||||
private boolean selected;
|
||||
|
||||
private String icon;
|
||||
private String title;
|
||||
private String description;
|
||||
private MedalType type;
|
||||
private boolean completed;
|
||||
private boolean selected;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MedalSelectRequest {
|
||||
private MedalType type;
|
||||
|
||||
private MedalType type;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MessageDto {
|
||||
private Long id;
|
||||
private String content;
|
||||
private UserSummaryDto sender;
|
||||
private Long conversationId;
|
||||
private LocalDateTime createdAt;
|
||||
private MessageDto replyTo;
|
||||
private List<ReactionDto> reactions;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String content;
|
||||
private UserSummaryDto sender;
|
||||
private Long conversationId;
|
||||
private LocalDateTime createdAt;
|
||||
private MessageDto replyTo;
|
||||
private List<ReactionDto> reactions;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MessageNotificationPayload implements Serializable {
|
||||
private String targetUsername;
|
||||
private Object payload;
|
||||
}
|
||||
|
||||
private String targetUsername;
|
||||
private Object payload;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Info about the milk tea activity. */
|
||||
@Data
|
||||
public class MilkTeaInfoDto {
|
||||
private long redeemCount;
|
||||
private boolean ended;
|
||||
|
||||
private long redeemCount;
|
||||
private boolean ended;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ import lombok.Data;
|
||||
/** Request to redeem the milk tea activity. */
|
||||
@Data
|
||||
public class MilkTeaRedeemRequest {
|
||||
private String contact;
|
||||
|
||||
private String contact;
|
||||
}
|
||||
|
||||
@@ -2,22 +2,22 @@ package com.openisle.dto;
|
||||
|
||||
import com.openisle.model.NotificationType;
|
||||
import com.openisle.model.ReactionType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/** DTO representing a user notification. */
|
||||
@Data
|
||||
public class NotificationDto {
|
||||
private Long id;
|
||||
private NotificationType type;
|
||||
private PostSummaryDto post;
|
||||
private CommentDto comment;
|
||||
private CommentDto parentComment;
|
||||
private AuthorDto fromUser;
|
||||
private ReactionType reactionType;
|
||||
private String content;
|
||||
private Boolean approved;
|
||||
private boolean read;
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
private Long id;
|
||||
private NotificationType type;
|
||||
private PostSummaryDto post;
|
||||
private CommentDto comment;
|
||||
private CommentDto parentComment;
|
||||
private AuthorDto fromUser;
|
||||
private ReactionType reactionType;
|
||||
private String content;
|
||||
private Boolean approved;
|
||||
private boolean read;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/** Request to mark notifications as read. */
|
||||
@Data
|
||||
public class NotificationMarkReadRequest {
|
||||
private List<Long> ids;
|
||||
|
||||
private List<Long> ids;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
/** User notification preference DTO. */
|
||||
@Data
|
||||
public class NotificationPreferenceDto {
|
||||
private NotificationType type;
|
||||
private boolean enabled;
|
||||
|
||||
private NotificationType type;
|
||||
private boolean enabled;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
/** Request to update a single notification preference. */
|
||||
@Data
|
||||
public class NotificationPreferenceUpdateRequest {
|
||||
private NotificationType type;
|
||||
private boolean enabled;
|
||||
|
||||
private NotificationType type;
|
||||
private boolean enabled;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ import lombok.Data;
|
||||
/** DTO representing unread notification count. */
|
||||
@Data
|
||||
public class NotificationUnreadCountDto {
|
||||
private long count;
|
||||
|
||||
private long count;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ import lombok.Data;
|
||||
/** DTO representing a parent comment. */
|
||||
@Data
|
||||
public class ParentCommentDto {
|
||||
private Long id;
|
||||
private String author;
|
||||
private String content;
|
||||
|
||||
private Long id;
|
||||
private String author;
|
||||
private String content;
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PioneerMedalDto extends MedalDto {
|
||||
private long rank;
|
||||
|
||||
private long rank;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import lombok.Data;
|
||||
/** Point mall good info. */
|
||||
@Data
|
||||
public class PointGoodDto {
|
||||
private Long id;
|
||||
private String name;
|
||||
private int cost;
|
||||
private String image;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private int cost;
|
||||
private String image;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import com.openisle.model.PointHistoryType;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class PointHistoryDto {
|
||||
private Long id;
|
||||
private PointHistoryType type;
|
||||
private int amount;
|
||||
private int balance;
|
||||
private Long postId;
|
||||
private String postTitle;
|
||||
private Long commentId;
|
||||
private String commentContent;
|
||||
private Long fromUserId;
|
||||
private String fromUserName;
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
private Long id;
|
||||
private PointHistoryType type;
|
||||
private int amount;
|
||||
private int balance;
|
||||
private Long postId;
|
||||
private String postTitle;
|
||||
private Long commentId;
|
||||
private String commentContent;
|
||||
private Long fromUserId;
|
||||
private String fromUserName;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request to redeem a point mall good. */
|
||||
@Data
|
||||
public class PointRedeemRequest {
|
||||
private Long goodId;
|
||||
private String contact;
|
||||
|
||||
private Long goodId;
|
||||
private String contact;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PollDto {
|
||||
private List<String> options;
|
||||
private Map<Integer, Integer> votes;
|
||||
private LocalDateTime endTime;
|
||||
private List<AuthorDto> participants;
|
||||
private Map<Integer, List<AuthorDto>> optionParticipants;
|
||||
private boolean multiple;
|
||||
|
||||
private List<String> options;
|
||||
private Map<Integer, Integer> votes;
|
||||
private LocalDateTime endTime;
|
||||
private List<AuthorDto> participants;
|
||||
private Map<Integer, List<AuthorDto>> optionParticipants;
|
||||
private boolean multiple;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import com.openisle.model.PostChangeType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class PostChangeLogDto {
|
||||
private Long id;
|
||||
private String username;
|
||||
private String userAvatar;
|
||||
private PostChangeType type;
|
||||
private LocalDateTime time;
|
||||
private String oldTitle;
|
||||
private String newTitle;
|
||||
private String oldContent;
|
||||
private String newContent;
|
||||
private CategoryDto oldCategory;
|
||||
private CategoryDto newCategory;
|
||||
private List<TagDto> oldTags;
|
||||
private List<TagDto> newTags;
|
||||
private Boolean oldClosed;
|
||||
private Boolean newClosed;
|
||||
private LocalDateTime oldPinnedAt;
|
||||
private LocalDateTime newPinnedAt;
|
||||
private Boolean oldFeatured;
|
||||
private Boolean newFeatured;
|
||||
|
||||
private Long id;
|
||||
private String username;
|
||||
private String userAvatar;
|
||||
private PostChangeType type;
|
||||
private LocalDateTime time;
|
||||
private String oldTitle;
|
||||
private String newTitle;
|
||||
private String oldContent;
|
||||
private String newContent;
|
||||
private CategoryDto oldCategory;
|
||||
private CategoryDto newCategory;
|
||||
private List<TagDto> oldTags;
|
||||
private List<TagDto> newTags;
|
||||
private Boolean oldClosed;
|
||||
private Boolean newClosed;
|
||||
private LocalDateTime oldPinnedAt;
|
||||
private LocalDateTime newPinnedAt;
|
||||
private Boolean oldFeatured;
|
||||
private Boolean newFeatured;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Detailed DTO for a post, including comments.
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PostDetailDto extends PostSummaryDto {
|
||||
private List<CommentDto> comments;
|
||||
}
|
||||
|
||||
private List<CommentDto> comments;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PostMedalDto extends MedalDto {
|
||||
private long currentPostCount;
|
||||
private long targetPostCount;
|
||||
|
||||
private long currentPostCount;
|
||||
private long targetPostCount;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/** Lightweight post metadata used in user profile lists. */
|
||||
@Data
|
||||
public class PostMetaDto {
|
||||
private Long id;
|
||||
private String title;
|
||||
private String snippet;
|
||||
private LocalDateTime createdAt;
|
||||
private String category;
|
||||
private long views;
|
||||
|
||||
private Long id;
|
||||
private String title;
|
||||
private String snippet;
|
||||
private LocalDateTime createdAt;
|
||||
private String category;
|
||||
private long views;
|
||||
}
|
||||
|
||||
@@ -1,33 +1,31 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import com.openisle.model.PostType;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.openisle.model.PostType;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Request body for creating or updating a post.
|
||||
*/
|
||||
@Data
|
||||
public class PostRequest {
|
||||
private Long categoryId;
|
||||
private String title;
|
||||
private String content;
|
||||
private List<Long> tagIds;
|
||||
private String captcha;
|
||||
|
||||
// optional for lottery posts
|
||||
private PostType type;
|
||||
private String prizeDescription;
|
||||
private String prizeIcon;
|
||||
private Integer prizeCount;
|
||||
private Integer pointCost;
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
// fields for poll posts
|
||||
private List<String> options;
|
||||
private Boolean multiple;
|
||||
private Long categoryId;
|
||||
private String title;
|
||||
private String content;
|
||||
private List<Long> tagIds;
|
||||
private String captcha;
|
||||
|
||||
// optional for lottery posts
|
||||
private PostType type;
|
||||
private String prizeDescription;
|
||||
private String prizeIcon;
|
||||
private Integer prizeCount;
|
||||
private Integer pointCost;
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
// fields for poll posts
|
||||
private List<String> options;
|
||||
private Boolean multiple;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,37 +2,36 @@ package com.openisle.dto;
|
||||
|
||||
import com.openisle.model.PostStatus;
|
||||
import com.openisle.model.PostType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Lightweight DTO for listing posts without comments.
|
||||
*/
|
||||
@Data
|
||||
public class PostSummaryDto {
|
||||
private Long id;
|
||||
private String title;
|
||||
private String content;
|
||||
private LocalDateTime createdAt;
|
||||
private AuthorDto author;
|
||||
private CategoryDto category;
|
||||
private List<TagDto> tags;
|
||||
private long views;
|
||||
private long commentCount;
|
||||
private PostStatus status;
|
||||
private LocalDateTime pinnedAt;
|
||||
private LocalDateTime lastReplyAt;
|
||||
private List<ReactionDto> reactions;
|
||||
private List<AuthorDto> participants;
|
||||
private boolean subscribed;
|
||||
private int reward;
|
||||
private int pointReward;
|
||||
private PostType type;
|
||||
private LotteryDto lottery;
|
||||
private PollDto poll;
|
||||
private boolean rssExcluded;
|
||||
private boolean closed;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String title;
|
||||
private String content;
|
||||
private LocalDateTime createdAt;
|
||||
private AuthorDto author;
|
||||
private CategoryDto category;
|
||||
private List<TagDto> tags;
|
||||
private long views;
|
||||
private long commentCount;
|
||||
private PostStatus status;
|
||||
private LocalDateTime pinnedAt;
|
||||
private LocalDateTime lastReplyAt;
|
||||
private List<ReactionDto> reactions;
|
||||
private List<AuthorDto> participants;
|
||||
private boolean subscribed;
|
||||
private int reward;
|
||||
private int pointReward;
|
||||
private PostType type;
|
||||
private LotteryDto lottery;
|
||||
private PollDto poll;
|
||||
private boolean rssExcluded;
|
||||
private boolean closed;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ import lombok.Data;
|
||||
/** Public key response for web push. */
|
||||
@Data
|
||||
public class PushPublicKeyDto {
|
||||
private String key;
|
||||
|
||||
private String key;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ import lombok.Data;
|
||||
/** Request body for saving a push subscription. */
|
||||
@Data
|
||||
public class PushSubscriptionRequest {
|
||||
private String endpoint;
|
||||
private String p256dh;
|
||||
private String auth;
|
||||
|
||||
private String endpoint;
|
||||
private String p256dh;
|
||||
private String auth;
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ReactionDto {
|
||||
private Long id;
|
||||
private ReactionType type;
|
||||
private String user;
|
||||
private Long postId;
|
||||
private Long commentId;
|
||||
private Long messageId;
|
||||
private int reward;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private ReactionType type;
|
||||
private String user;
|
||||
private Long postId;
|
||||
private Long commentId;
|
||||
private Long messageId;
|
||||
private int reward;
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ import lombok.Data;
|
||||
/** Request for reacting to a post or comment. */
|
||||
@Data
|
||||
public class ReactionRequest {
|
||||
private ReactionType type;
|
||||
|
||||
private ReactionType type;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@ import lombok.Data;
|
||||
/** Request to register a new user. */
|
||||
@Data
|
||||
public class RegisterRequest {
|
||||
private String username;
|
||||
private String email;
|
||||
private String password;
|
||||
private String captcha;
|
||||
private String inviteToken;
|
||||
|
||||
private String username;
|
||||
private String email;
|
||||
private String password;
|
||||
private String captcha;
|
||||
private String inviteToken;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request to reset password. */
|
||||
@Data
|
||||
public class ResetPasswordRequest {
|
||||
private String token;
|
||||
private String password;
|
||||
|
||||
private String token;
|
||||
private String password;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import lombok.Data;
|
||||
/** DTO representing a search result entry. */
|
||||
@Data
|
||||
public class SearchResultDto {
|
||||
private String type;
|
||||
private Long id;
|
||||
private String text;
|
||||
private String subText;
|
||||
private String extra;
|
||||
private Long postId;
|
||||
|
||||
private String type;
|
||||
private Long id;
|
||||
private String text;
|
||||
private String subText;
|
||||
private String extra;
|
||||
private Long postId;
|
||||
}
|
||||
|
||||
@@ -7,5 +7,6 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SeedUserMedalDto extends MedalDto {
|
||||
private LocalDateTime registerDate;
|
||||
|
||||
private LocalDateTime registerDate;
|
||||
}
|
||||
|
||||
@@ -6,11 +6,12 @@ import lombok.Data;
|
||||
/** Public site configuration values. */
|
||||
@Data
|
||||
public class SiteConfigDto {
|
||||
private boolean captchaEnabled;
|
||||
private boolean registerCaptchaEnabled;
|
||||
private boolean loginCaptchaEnabled;
|
||||
private boolean postCaptchaEnabled;
|
||||
private boolean commentCaptchaEnabled;
|
||||
private int aiFormatLimit;
|
||||
private RegisterMode registerMode;
|
||||
|
||||
private boolean captchaEnabled;
|
||||
private boolean registerCaptchaEnabled;
|
||||
private boolean loginCaptchaEnabled;
|
||||
private boolean postCaptchaEnabled;
|
||||
private boolean commentCaptchaEnabled;
|
||||
private int aiFormatLimit;
|
||||
private RegisterMode registerMode;
|
||||
}
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* DTO representing a tag.
|
||||
*/
|
||||
@Data
|
||||
public class TagDto {
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
private LocalDateTime createdAt;
|
||||
private Long count;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
private LocalDateTime createdAt;
|
||||
private Long count;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import lombok.Data;
|
||||
/** Request body for creating or updating a tag. */
|
||||
@Data
|
||||
public class TagRequest {
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
|
||||
private String name;
|
||||
private String description;
|
||||
private String icon;
|
||||
private String smallIcon;
|
||||
}
|
||||
|
||||
@@ -5,12 +5,13 @@ import lombok.Data;
|
||||
/** Request for Telegram login. */
|
||||
@Data
|
||||
public class TelegramLoginRequest {
|
||||
private String id;
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String username;
|
||||
private String photoUrl;
|
||||
private Long authDate;
|
||||
private String hash;
|
||||
private String inviteToken;
|
||||
|
||||
private String id;
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String username;
|
||||
private String photoUrl;
|
||||
private Long authDate;
|
||||
private String hash;
|
||||
private String inviteToken;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* comment and change_log Dto
|
||||
@@ -13,8 +12,8 @@ import java.time.LocalDateTime;
|
||||
@NoArgsConstructor
|
||||
public class TimelineItemDto<T> {
|
||||
|
||||
private Long id;
|
||||
private String kind; // "comment" | "log"
|
||||
private LocalDateTime createdAt;
|
||||
private T payload; // 泛型,具体类型由外部决定
|
||||
private Long id;
|
||||
private String kind; // "comment" | "log"
|
||||
private LocalDateTime createdAt;
|
||||
private T payload; // 泛型,具体类型由外部决定
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import lombok.Data;
|
||||
/** Request for Twitter OAuth login. */
|
||||
@Data
|
||||
public class TwitterLoginRequest {
|
||||
private String code;
|
||||
private String redirectUri;
|
||||
private String codeVerifier;
|
||||
private String inviteToken;
|
||||
|
||||
private String code;
|
||||
private String redirectUri;
|
||||
private String codeVerifier;
|
||||
private String inviteToken;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request body for updating user profile. */
|
||||
@Data
|
||||
public class UpdateProfileDto {
|
||||
private String username;
|
||||
private String introduction;
|
||||
|
||||
private String username;
|
||||
private String introduction;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/** Aggregated user data including posts and replies. */
|
||||
@Data
|
||||
public class UserAggregateDto {
|
||||
private UserDto user;
|
||||
private List<PostMetaDto> posts;
|
||||
private List<CommentInfoDto> replies;
|
||||
|
||||
private UserDto user;
|
||||
private List<PostMetaDto> posts;
|
||||
private List<CommentInfoDto> replies;
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/** Detailed user information. */
|
||||
@Data
|
||||
public class UserDto {
|
||||
private Long id;
|
||||
private String username;
|
||||
private String email;
|
||||
private String avatar;
|
||||
private String role;
|
||||
private String introduction;
|
||||
private long followers;
|
||||
private long following;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime lastPostTime;
|
||||
private LocalDateTime lastCommentTime;
|
||||
private long totalViews;
|
||||
private long visitedDays;
|
||||
private long readPosts;
|
||||
private long likesSent;
|
||||
private long likesReceived;
|
||||
private boolean subscribed;
|
||||
private int experience;
|
||||
private int point;
|
||||
private int currentLevel;
|
||||
private int nextLevelExp;
|
||||
|
||||
private Long id;
|
||||
private String username;
|
||||
private String email;
|
||||
private String avatar;
|
||||
private String role;
|
||||
private String introduction;
|
||||
private long followers;
|
||||
private long following;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime lastPostTime;
|
||||
private LocalDateTime lastCommentTime;
|
||||
private long totalViews;
|
||||
private long visitedDays;
|
||||
private long readPosts;
|
||||
private long likesSent;
|
||||
private long likesReceived;
|
||||
private boolean subscribed;
|
||||
private int experience;
|
||||
private int point;
|
||||
private int currentLevel;
|
||||
private int nextLevelExp;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserSummaryDto {
|
||||
private Long id;
|
||||
private String username;
|
||||
private String avatar;
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private String username;
|
||||
private String avatar;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request to verify a forgot password code. */
|
||||
@Data
|
||||
public class VerifyForgotRequest {
|
||||
private String email;
|
||||
private String code;
|
||||
|
||||
private String email;
|
||||
private String code;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
/** Request to verify a user registration. */
|
||||
@Data
|
||||
public class VerifyRequest {
|
||||
private String username;
|
||||
private String code;
|
||||
|
||||
private String username;
|
||||
private String code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user