feat: add poll post type

This commit is contained in:
Tim
2025-08-29 22:36:36 +08:00
parent 59232f99ca
commit 55dd36bd24
9 changed files with 140 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
package com.openisle.dto;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@Data
public class PollDto {
private String question;
private List<String> options;
private Map<Integer, Integer> votes;
private LocalDateTime endTime;
private List<AuthorDto> participants;
}

View File

@@ -26,5 +26,8 @@ public class PostRequest {
private Integer pointCost;
private LocalDateTime startTime;
private LocalDateTime endTime;
// fields for poll posts
private String question;
private List<String> options;
}

View File

@@ -31,6 +31,7 @@ public class PostSummaryDto {
private int pointReward;
private PostType type;
private LotteryDto lottery;
private PollDto poll;
private boolean rssExcluded;
private boolean closed;
}