source: src/main/java/com/example/model/Location.java

Last change on this file was a51a591, checked in by colovik <j.colovik@…>, 14 months ago

final

  • Property mode set to 100644
File size: 595 bytes
Line 
1package com.example.model;
2
3import lombok.Getter;
4import lombok.Setter;
5
6import javax.persistence.*;
7import java.util.List;
8
9@Getter
10@Setter
11@Entity
12@Table(name = "lokacii")
13public class Location {
14
15 @Id
16 @Column(name = "adresa")
17 String address;
18
19 @Column(name = "cena")
20 Integer price;
21
22 @OneToMany(mappedBy = "location")
23 List<Event> events;
24
25 public Location(String address, Integer price) {
26 this.address = address;
27 this.price = price;
28 }
29
30 public Location() {
31 }
32
33 @Override
34 public String toString() {
35 return address;
36 }
37}
Note: See TracBrowser for help on using the repository browser.