source: src/main/java/com/example/baza/model/Authentication.java

Last change on this file was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 987 bytes
Line 
1package com.example.baza.model;
2
3import javax.persistence.*;
4import java.time.Instant;
5
6@Entity
7@Table(name = "authentication", schema = "project")
8public class Authentication {
9 @Id
10 @GeneratedValue(strategy = GenerationType.IDENTITY)
11 @Column(name = "log_id", nullable = false)
12 private Integer id;
13
14 @Column(name = "timestamp_log", nullable = false)
15 private Instant timestampLog;
16
17 @ManyToOne(fetch = FetchType.LAZY, optional = false)
18 @JoinColumn(name = "id_chovek", nullable = false)
19 private Chovek2 chovek;
20
21 public Chovek2 getChovek() {
22 return chovek;
23 }
24
25 public void setChovek(Chovek2 chovek) {
26 this.chovek = chovek;
27 }
28
29 public Instant getTimestampLog() {
30 return timestampLog;
31 }
32
33 public void setTimestampLog(Instant timestampLog) {
34 this.timestampLog = timestampLog;
35 }
36
37 public Integer getId() {
38 return id;
39 }
40
41 public void setId(Integer id) {
42 this.id = id;
43 }
44}
Note: See TracBrowser for help on using the repository browser.