package com.openisle.model; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; /** * Represents a single vote in a poll, capturing which user selected which option. */ @Entity @Table(name = "poll_participants") @Getter @Setter @NoArgsConstructor public class PollParticipant { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "post_id", nullable = false) private PollPost post; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id", nullable = false) private User user; @Column(name = "option_index", nullable = false) private int optionIndex; }