package ru.kayashov.bar.model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
@Entity
@Table(name = "glass")
public class GlassEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Column(name = "en_name", nullable = false, length = Integer.MAX_VALUE)
    private String enName;
    private String name;

    @OneToMany(mappedBy = "glassEntity")
    private List<CocktailEntity> cocktails;
}