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;
import javax.persistence.Table;

@Entity
@Table(name = "receipt")
@Getter
@Setter
public class ReceiptEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne
    private CocktailEntity cocktail;

    @ManyToOne
    private IngredientEntity ingredient;

    private String measure;

    private Float count;

    @ManyToOne
    private Unit unit;
}
