package ru.kayashov.bar.model.entity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

@Entity
@Getter
@Setter
public class Pay {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne
    private CocktailEntity cocktail;

    @ManyToOne
    private Visitor visitor;

    @Enumerated(EnumType.STRING)
    private OrderStatus status;

    @ManyToOne
    private SessionEntity session;

    private LocalDateTime createdAt;
    private LocalDateTime closedAt;
}
