source: phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/OfferReport.java

Last change on this file was 47f4eaf, checked in by Marko <Marko@…>, 2 years ago

Final features implemented

  • Property mode set to 100644
File size: 1.1 KB
Line 
1package finki.it.phoneluxbackend.entities;
2
3import com.fasterxml.jackson.annotation.JsonIgnore;
4import lombok.*;
5
6import javax.persistence.*;
7import java.time.LocalDateTime;
8
9@AllArgsConstructor
10@NoArgsConstructor
11@Getter
12@Setter
13@ToString
14@Entity
15public 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.