source: source/freeparkingspace/src/main/java/com/proekt/model/Avtomobil.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.4 KB
Line 
1package com.proekt.model;
2
3
4import com.proekt.model.Korisnik.Korisnik;
5import lombok.Data;
6
7import javax.persistence.*;
8import javax.persistence.ManyToOne;
9
10@Data
11@Table
12@Entity
13
14public class Avtomobil {
15
16 @Id
17 @Column(name="reg_tablica")
18 private String regTablica;
19
20 @Column(nullable = false,length = 20,unique = true)
21 private String marka;
22
23 @Column(nullable = false,length = 15,unique = true)
24 private String boja;
25
26
27
28 @ManyToOne
29 @JoinColumn(name="korisnickoime")
30 public Korisnik korisnickoIme;
31
32 public Avtomobil(String regTablica, String marka, String boja, Korisnik korisnik) {
33 this.regTablica = regTablica;
34 this.korisnickoIme = korisnik;
35 this.marka = marka;
36 this.boja = boja;
37 }
38
39 public Avtomobil() {
40 }
41
42 public String getRegTablica() {
43 return regTablica;
44 }
45
46 public void setRegTablica(String regTablica) {
47 this.regTablica = regTablica;
48 }
49
50 public String getMarka() {
51 return marka;
52 }
53
54 public void setMarka(String marka) {
55 this.marka = marka;
56 }
57
58 public String getBoja() {
59 return boja;
60 }
61
62 public void setBoja(String boja) {
63 this.boja = boja;
64 }
65
66 public Korisnik getKorisnickoIme() {
67 return korisnickoIme;
68 }
69
70 public void setKorisnickoIme(Korisnik korisnickoIme) {
71 this.korisnickoIme = korisnickoIme;
72 }
73}
Note: See TracBrowser for help on using the repository browser.