package com.plannaplan.entities; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import com.plannaplan.types.EventTypes; @Entity public class Event { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private EventTypes type; @ManyToOne @JoinColumn(name = "user_id") private User user; public Event() { } public EventTypes getType() { return type; } public void setType(EventTypes type) { this.type = type; } }