Last change
on this file since ab49338 was ab49338, checked in by KostaFortumanov <kfortumanov@…>, 3 years ago |
Dodadeno prijavuvanje na objavi
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | package it.finki.charitable.entities;
|
---|
2 |
|
---|
3 | import javax.persistence.*;
|
---|
4 | import java.util.ArrayList;
|
---|
5 | import java.util.List;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | @Table(name = "report_post")
|
---|
9 | public class ReportPost {
|
---|
10 |
|
---|
11 | @SequenceGenerator(
|
---|
12 | name = "report_post_sequence",
|
---|
13 | sequenceName = "report_post_sequence",
|
---|
14 | allocationSize = 1
|
---|
15 | )
|
---|
16 | @GeneratedValue(
|
---|
17 | strategy = GenerationType.SEQUENCE,
|
---|
18 | generator = "report_post_sequence"
|
---|
19 | )
|
---|
20 | @Id
|
---|
21 | @Column(
|
---|
22 | name = "id",
|
---|
23 | nullable = false,
|
---|
24 | updatable = false
|
---|
25 | )
|
---|
26 | private Long id;
|
---|
27 |
|
---|
28 | @OneToOne
|
---|
29 | private DonationPost donationPost;
|
---|
30 |
|
---|
31 | @OneToMany
|
---|
32 | private List<Reason> reasons = new ArrayList<>();
|
---|
33 |
|
---|
34 | public Long getId() {
|
---|
35 | return id;
|
---|
36 | }
|
---|
37 |
|
---|
38 | public void setId(Long id) {
|
---|
39 | this.id = id;
|
---|
40 | }
|
---|
41 |
|
---|
42 | public DonationPost getDonationPost() {
|
---|
43 | return donationPost;
|
---|
44 | }
|
---|
45 |
|
---|
46 | public void setDonationPost(DonationPost donationPost) {
|
---|
47 | this.donationPost = donationPost;
|
---|
48 | }
|
---|
49 |
|
---|
50 | public List<Reason> getReasons() {
|
---|
51 | return reasons;
|
---|
52 | }
|
---|
53 |
|
---|
54 | public void setReasons(List<Reason> reasons) {
|
---|
55 | this.reasons = reasons;
|
---|
56 | }
|
---|
57 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.