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