package de.oaa.xxx.gruppe.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.util.UUID;

@Getter
@Setter
@Entity
@Table(name = "umfrage_stimme",
        uniqueConstraints = @UniqueConstraint(columnNames = {"optionId", "userId"}))
public class UmfrageStimmeEntity {

    @Id
    @Column
    private UUID stimmeId;

    @Column(nullable = false)
    private UUID optionId;

    @Column(nullable = false)
    private UUID beitragId;

    @Column(nullable = false)
    private UUID userId;
}
