Last change
on this file was 31d67c0, checked in by zlatko2810 <zlatko.stojanovski@…>, 2 years ago |
proekt
|
-
Property mode
set to
100644
|
File size:
745 bytes
|
Line | |
---|
1 | package com.proekt.model;
|
---|
2 | import com.proekt.model.Korisnik.Korisnik;
|
---|
3 | import lombok.Data;
|
---|
4 | import javax.persistence.ManyToOne;
|
---|
5 | import javax.persistence.*;
|
---|
6 |
|
---|
7 | @Data
|
---|
8 | @Table
|
---|
9 | @Entity
|
---|
10 | public class Kazna {
|
---|
11 | @Id
|
---|
12 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
13 | @Column(nullable = false,unique = true)
|
---|
14 | private int idKazna;
|
---|
15 | @Column(nullable = false,unique = true)
|
---|
16 | private int iznos;
|
---|
17 | @Column(nullable = false,unique = true)
|
---|
18 | private int brojKazni;
|
---|
19 | @ManyToOne
|
---|
20 | @JoinColumn(name="korisnickoime")
|
---|
21 | public Korisnik korisnickoIme;
|
---|
22 |
|
---|
23 | public Kazna() {
|
---|
24 | }
|
---|
25 |
|
---|
26 | public Kazna(int idKazna, int iznos, int brojKazni) {
|
---|
27 | this.idKazna = idKazna;
|
---|
28 | this.iznos = iznos;
|
---|
29 | this.brojKazni = brojKazni;
|
---|
30 | }
|
---|
31 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.