source: src/main/java/com/project/beautycenter/model/VraboteniUslugi.java

Last change on this file was 850b344, checked in by Tamara Simikj <tamara.simic12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
1package com.project.beautycenter.model;
2
3import javax.persistence.*;
4
5@Entity
6@Table(name = "vraboteni_uslugi", schema = "project")
7public class VraboteniUslugi {
8 @EmbeddedId
9 private VraboteniUslugiId id;
10
11 @MapsId("userIdVraboten")
12 @ManyToOne(fetch = FetchType.LAZY, optional = false)
13 @JoinColumn(name = "user_id_vraboten", nullable = false)
14 private Vraboteni userIdVraboten;
15
16 @MapsId("uslugaId")
17 @ManyToOne(fetch = FetchType.LAZY, optional = false)
18 @JoinColumn(name = "usluga_id", nullable = false)
19 private Uslugi usluga;
20
21 public VraboteniUslugi(){}
22
23 public VraboteniUslugi(Vraboteni userIdVraboten, Uslugi usluga) {
24 this.userIdVraboten = userIdVraboten;
25 this.usluga = usluga;
26 }
27
28 public VraboteniUslugi(VraboteniUslugiId id, Vraboteni userIdVraboten, Uslugi usluga) {
29 this.id = id;
30 this.userIdVraboten = userIdVraboten;
31 this.usluga = usluga;
32 }
33
34 public Uslugi getUsluga() {
35 return usluga;
36 }
37
38 public void setUsluga(Uslugi usluga) {
39 this.usluga = usluga;
40 }
41
42 public Vraboteni getUserIdVraboten() {
43 return userIdVraboten;
44 }
45
46 public void setUserIdVraboten(Vraboteni userIdVraboten) {
47 this.userIdVraboten = userIdVraboten;
48 }
49
50 public VraboteniUslugiId getId() {
51 return id;
52 }
53
54 public void setId(VraboteniUslugiId id) {
55 this.id = id;
56 }
57}
Note: See TracBrowser for help on using the repository browser.