source: source/freeparkingspace/src/main/java/com/proekt/model/Kontrola.java

Last change on this file was 31d67c0, checked in by zlatko2810 <zlatko.stojanovski@…>, 2 years ago

proekt

  • Property mode set to 100644
File size: 1.3 KB
Line 
1package com.proekt.model;
2
3import com.proekt.model.Kontroler.Kontroler;
4import lombok.Data;
5
6import javax.persistence.*;
7import java.time.LocalDateTime;
8import javax.persistence.ManyToOne;
9@Data
10@Table
11@Entity
12public class Kontrola {
13 @Id
14 @GeneratedValue(strategy = GenerationType.IDENTITY)
15 @Column(nullable = false, unique = true)
16 private int idKontrola;
17
18 @Column(nullable = false, unique = true)
19 private int izvrsenaKontrola;
20
21 @Column(nullable = false, unique = true)
22 private LocalDateTime vremeNaKontrola;
23
24 @Column(nullable = false,length = 300)
25 private String konstantacija;
26
27 @ManyToOne
28 @JoinColumn(name="korisnicko_ime")
29 public Kontroler korisnickoIme;
30
31 @ManyToOne
32 @JoinColumn(name="broj_na_pmesta")
33 public ParkingMesto brojNaPmesta;
34
35 @ManyToOne
36 @JoinColumn(name="id_rezervacija")
37 public Rezervacija idRezervacija;
38
39 @ManyToOne
40 @JoinColumn(name="id_kazna")
41 public Kazna idKazna;
42
43 public Kontrola() {
44 }
45
46 public Kontrola(int idKontrola, int izvrsenaKontrola, LocalDateTime vremeNaKontrola, String konstantacija) {
47 this.idKontrola = idKontrola;
48 this.izvrsenaKontrola = izvrsenaKontrola;
49 this.vremeNaKontrola = vremeNaKontrola;
50 this.konstantacija = konstantacija;
51 }
52}
Note: See TracBrowser for help on using the repository browser.