Last change
on this file since 47f4eaf was 47f4eaf, checked in by Marko <Marko@…>, 20 months ago |
Final features implemented
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[47f4eaf] | 1 | package finki.it.phoneluxbackend.entities;
|
---|
| 2 |
|
---|
| 3 | import com.fasterxml.jackson.annotation.JsonIgnore;
|
---|
| 4 | import lombok.*;
|
---|
| 5 |
|
---|
| 6 | import javax.persistence.*;
|
---|
| 7 | import java.time.LocalDateTime;
|
---|
| 8 |
|
---|
| 9 | @AllArgsConstructor
|
---|
| 10 | @NoArgsConstructor
|
---|
| 11 | @Getter
|
---|
| 12 | @Setter
|
---|
| 13 | @ToString
|
---|
| 14 | @Entity
|
---|
| 15 | public class OfferReport {
|
---|
| 16 | @SequenceGenerator(
|
---|
| 17 | name = "offer_report_sequence",
|
---|
| 18 | sequenceName = "offer_report_sequence",
|
---|
| 19 | allocationSize = 1
|
---|
| 20 | )
|
---|
| 21 | @Id
|
---|
| 22 | @GeneratedValue(
|
---|
| 23 | strategy = GenerationType.SEQUENCE,
|
---|
| 24 | generator = "offer_report_sequence"
|
---|
| 25 | )
|
---|
| 26 | private Long id;
|
---|
| 27 |
|
---|
| 28 | @ManyToOne(fetch = FetchType.EAGER)
|
---|
| 29 | @JoinColumn(name = "offer_id", referencedColumnName = "offer_id")
|
---|
| 30 | private PhoneOffer phoneOffer;
|
---|
| 31 |
|
---|
| 32 | private Integer times_reported;
|
---|
| 33 |
|
---|
| 34 | private LocalDateTime reportedAt;
|
---|
| 35 |
|
---|
| 36 | private String reportedBy;
|
---|
| 37 |
|
---|
| 38 |
|
---|
| 39 | public OfferReport(PhoneOffer phoneOffer, Integer times_reported, LocalDateTime reportedAt, String reportedBy) {
|
---|
| 40 | this.phoneOffer = phoneOffer;
|
---|
| 41 | this.times_reported = times_reported;
|
---|
| 42 | this.reportedAt = reportedAt;
|
---|
| 43 | this.reportedBy = reportedBy;
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.