Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import lombok.Getter;
- import lombok.Setter;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.FetchType;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- import javax.persistence.OneToMany;
- import javax.persistence.Table;
- import javax.persistence.Version;
- import java.util.HashSet;
- import java.util.Set;
- @Entity
- @Table(name = "VENUE")
- @Getter
- @Setter
- public class VenueEntity {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "ID", nullable = false)
- private Long id;
- @Column(name = "NAME", nullable = false)
- private String name;
- @Column(name = "IMAGE", nullable = false)
- private String image;
- @Column(name = "ACTIVE", nullable = false)
- private Boolean active;
- @Column(name = "COORDINATES")
- private String coordinates;
- @Column(name = "RATING")
- private Long rating;
- @Column(name = "COUNTRY")
- private String country;
- @Column(name = "CITY")
- private String city;
- @OneToMany(mappedBy = "venue", fetch = FetchType.EAGER)
- private Set<ConcertEntity> concert = new HashSet<>();
- @Column(name = "VERSION")
- @Version
- private Long version;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement