package de.oaa.xxx.vorlieben;

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

import java.util.UUID;

@Getter
@Setter
@Entity
@Table(name = "user_vorliebe",
        uniqueConstraints = @UniqueConstraint(columnNames = {"userId", "itemId"}))
public class UserVorliebeEntity {

    @Id
    @Column
    private UUID id;

    @Column(nullable = false)
    private UUID userId;

    @Column(nullable = false)
    private UUID itemId;

    @Enumerated(EnumType.STRING)
    @Column(nullable = false, length = 30)
    private VorliebeBewertung bewertung;
}
