source: src/main/java/com/example/medweb/model/Termin.java

Last change on this file was e5fefbd, checked in by Anita Terziska <63020646+Nit4e@…>, 2 years ago

initial commit

  • Property mode set to 100644
File size: 854 bytes
Line 
1package com.example.medweb.model;
2
3import lombok.Data;
4import org.hibernate.annotations.GenericGenerator;
5
6import javax.persistence.*;
7import java.io.Serializable;
8import java.time.ZonedDateTime;
9
10
11@Data
12@Entity
13@IdClass(TerminId.class)
14@Table(name = "termin")
15public class Termin implements Serializable {
16
17 @Id
18 //@GeneratedValue(strategy = GenerationType.IDENTITY)
19 @GeneratedValue(generator = "increment")
20 @GenericGenerator(name = "increment", strategy = "increment")
21 @Column(name = "termin_id", insertable = false, updatable = false)
22 private Integer termin_id;
23
24 @Id
25 private Integer doktor_id;
26
27 @Id
28 @ManyToOne
29 @JoinColumn(name = "doktor_id", referencedColumnName = "doktor_id", insertable = false, updatable = false)
30 private Doktor doktor;
31
32 private ZonedDateTime vreme;
33
34 public Termin() {
35 }
36}
Note: See TracBrowser for help on using the repository browser.