mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-20 05:50:53 +08:00
refactor: extract post dtos
This commit is contained in:
30
backend/src/main/java/com/openisle/dto/PostSummaryDto.java
Normal file
30
backend/src/main/java/com/openisle/dto/PostSummaryDto.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.openisle.dto;
|
||||
|
||||
import com.openisle.model.PostStatus;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 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 PostStatus status;
|
||||
private LocalDateTime pinnedAt;
|
||||
private LocalDateTime lastReplyAt;
|
||||
private List<ReactionDto> reactions;
|
||||
private List<AuthorDto> participants;
|
||||
private boolean subscribed;
|
||||
private int reward;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user