mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-21 06:20:59 +08:00
feat: track poll votes
This commit is contained in:
@@ -30,11 +30,8 @@ public class PollPost extends Post {
|
||||
@Column(name = "vote_count")
|
||||
private Map<Integer, Integer> votes = new HashMap<>();
|
||||
|
||||
@ManyToMany
|
||||
@JoinTable(name = "poll_participants",
|
||||
joinColumns = @JoinColumn(name = "post_id"),
|
||||
inverseJoinColumns = @JoinColumn(name = "user_id"))
|
||||
private Set<User> participants = new HashSet<>();
|
||||
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private Set<PollParticipant> participants = new HashSet<>();
|
||||
|
||||
@Column
|
||||
private LocalDateTime endTime;
|
||||
|
||||
Reference in New Issue
Block a user