Revert "feat: track poll votes"

This reverts commit 23582934fa.
This commit is contained in:
tim
2025-08-30 12:05:35 +08:00
parent a57f3e6406
commit c3ae97f8ba
5 changed files with 9 additions and 52 deletions

View File

@@ -30,8 +30,11 @@ public class PollPost extends Post {
@Column(name = "vote_count")
private Map<Integer, Integer> votes = new HashMap<>();
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true)
private Set<PollParticipant> participants = new HashSet<>();
@ManyToMany
@JoinTable(name = "poll_participants",
joinColumns = @JoinColumn(name = "post_id"),
inverseJoinColumns = @JoinColumn(name = "user_id"))
private Set<User> participants = new HashSet<>();
@Column
private LocalDateTime endTime;