1 | package mk.ukim.finki.busngo.model.entities;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Data;
|
---|
5 | import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
|
---|
6 |
|
---|
7 | import java.sql.Timestamp;
|
---|
8 | import java.util.Objects;
|
---|
9 |
|
---|
10 | @Data
|
---|
11 | @Entity
|
---|
12 | public class Vozenje {
|
---|
13 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
14 | @Id
|
---|
15 | @Column(name = "vozenje_id")
|
---|
16 | private Long vozenjeId;
|
---|
17 | @Basic
|
---|
18 | @Column(name = "vozenje_start")
|
---|
19 | private Timestamp vozenjeStart;
|
---|
20 | @Basic
|
---|
21 | @Column(name = "vozenje_end")
|
---|
22 | private Timestamp vozenjeEnd;
|
---|
23 | @Basic
|
---|
24 | @Column(name = "vozenje_status")
|
---|
25 | @Enumerated(EnumType.STRING)
|
---|
26 | private VOZENJE_STATUS vozenjeStatus;
|
---|
27 | @ManyToOne
|
---|
28 | @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id")
|
---|
29 | private Patnik korisnikByPatnikKId;
|
---|
30 | @ManyToOne
|
---|
31 | @JoinColumn(name = "kacuva_pnl_id", referencedColumnName = "pnl_id", nullable = false)
|
---|
32 | private Postojkanalinija postojkanalinijaByKacuvaPnlId;
|
---|
33 | @ManyToOne
|
---|
34 | @JoinColumn(name = "inl_id", referencedColumnName = "inl_id", nullable = false)
|
---|
35 | private Instancanalinija instancanalinijaByInlId;
|
---|
36 | @ManyToOne
|
---|
37 | @JoinColumn(name = "b_id", referencedColumnName = "b_id", nullable = false)
|
---|
38 | private Bilet biletByBId;
|
---|
39 |
|
---|
40 | }
|
---|