-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFeedback.java
111 lines (93 loc) · 2.68 KB
/
Feedback.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import java.util.Date;
/**
* @author zheng_zz
*/
public class Feedback {
private Integer id;
private Integer requestInfoId;
private String category;
private Double score;
private String content;
private Date time;
private String abuseInfo;
public Feedback(Integer requestInfoId, String category, Double score, String content, Date time, String abuseInfo) {
this.requestInfoId = requestInfoId;
this.category = category;
this.score = score;
this.content = content;
this.time = time;
this.abuseInfo = abuseInfo;
}
public Feedback(Integer id, Integer requestInfoId, String category, Double score, String content,
Date time, String abuseInfo) {
this.id = id;
this.requestInfoId = requestInfoId;
this.category = category;
this.score = score;
this.content = content;
this.time = time;
this.abuseInfo = abuseInfo;
}
public Integer getRequestInfoId() {
return requestInfoId;
}
public void setRequestInfoId(Integer requetInfoId) {
this.requestInfoId = requetInfoId;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public Double getScore() {
return score;
}
public void setScore(Double score) {
this.score = score;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public String getAbuseInfo() {
return abuseInfo;
}
public void setAbuseInfo(String abuseInfo) {
this.abuseInfo = abuseInfo;
}
/**
* Report abuse info
* It should be send to Match System and save to DB
* but this is a simple example
* @param abuseInfo
*/
public void reportAbuseInfo(String abuseInfo){
System.out.println(abuseInfo);
}
public static Feedback getFeedbackById(Integer id){
Feedback feedback = new Feedback(id,1,"cate", 1.1,
"content", new Date(), "abuse");
return feedback;
}
@Override
public String toString() {
return "Feedback{" +
"id=" + id +
", requestInfoId=" + requestInfoId +
", category='" + category + '\'' +
", score=" + score +
", content='" + content + '\'' +
", time=" + time +
", abuseInfo='" + abuseInfo + '\'' +
'}';
}
}