31 lines
555 B
Java
31 lines
555 B
Java
package ru.kayashov.bar.model.entity;
|
|
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.ManyToOne;
|
|
|
|
@Entity
|
|
@Getter
|
|
@Setter
|
|
public class Rating {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
private int rating;
|
|
|
|
private boolean isFavorite;
|
|
|
|
@ManyToOne
|
|
private CocktailEntity cocktail;
|
|
|
|
@ManyToOne
|
|
private Visitor visitor;
|
|
}
|