source: springapp/src/main/java/mk/profesori/springapp/Model/City.java@ 9bf1f8d

main
Last change on this file since 9bf1f8d was 9bf1f8d, checked in by viktor <viktor@…>, 17 months ago

prefinal

  • Property mode set to 100644
File size: 637 bytes
Line 
1package mk.profesori.springapp.Model;
2
3import com.fasterxml.jackson.annotation.JsonIdentityInfo;
4import com.voodoodyne.jackson.jsog.JSOGGenerator;
5import lombok.Data;
6
7import javax.persistence.*;
8import java.util.HashSet;
9import java.util.Set;
10
11@Entity
12@Data
13@Table(name = "city")
14@JsonIdentityInfo(generator = JSOGGenerator.class)
15public class City {
16
17 @Id
18 @GeneratedValue(strategy = GenerationType.IDENTITY)
19 @Column(name = "id")
20 private Long cityId;
21
22 @Column(name = "name")
23 private String cityName;
24
25 @Transient
26 @OneToMany(mappedBy = "city")
27 private Set<University> universities = new HashSet<>();
28
29}
Note: See TracBrowser for help on using the repository browser.