-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFeedback.java
120 lines (85 loc) · 2.46 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
112
113
114
115
116
117
118
119
120
package com.feedback;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
@Table(name="feedback")
@Entity
public class Feedback {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(nullable = false)
private String firstName;
@Column(nullable = false)
private String lastName;
@Column(nullable = false, unique = true)
private String email;
@Column(nullable = false)
private String gender;
@Column(length = 1000)
private String message;
public Feedback(){
super();
}
public Feedback(String email, String firstName, String gender, Long id, String lastName, String message) {
this.email = email;
this.firstName = firstName;
this.gender = gender;
this.id = id;
this.lastName = lastName;
this.message = message;
}
// Getters and Setters
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Feedback{");
sb.append("id=").append(id);
sb.append(", firstName=").append(firstName);
sb.append(", lastName=").append(lastName);
sb.append(", email=").append(email);
sb.append(", gender=").append(gender);
sb.append(", message=").append(message);
sb.append('}');
return sb.toString();
}
}