@@ -27,6 +27,9 @@ public class Idea extends AbstractIdea {
2727 @ Column (nullable = false )
2828 private IdeaState state ;
2929
30+ @ Column (nullable = true )
31+ private String email ;
32+
3033 @ ManyToOne (fetch = EAGER , cascade = { CascadeType .REFRESH , CascadeType .DETACH }, optional = true )
3134 @ JsonIdentityInfo (generator = ObjectIdGenerators .PropertyGenerator .class , scope = FeatureProposal .class , property = "id" )
3235 @ JsonIdentityReference (alwaysAsId = true )
@@ -43,8 +46,13 @@ public Idea(String title, String description) {
4346 this .state = IdeaState .WAITING_ON_REVIEW ;
4447 }
4548
49+ public Idea (String title , String description , String email ) {
50+ this (title , description );
51+ this .email = email ;
52+ }
53+
4654 public Idea (ServiceRequest serviceRequest ) {
47- this (serviceRequest .getTitle (), serviceRequest .getDescription ());
55+ this (serviceRequest .getTitle (), serviceRequest .getDescription (), serviceRequest . getEmail () );
4856 }
4957
5058 public Idea (String title , String description , User author ) {
@@ -65,6 +73,14 @@ public void setState(IdeaState state) {
6573 this .state = state ;
6674 }
6775
76+ public String getEmail () {
77+ return email ;
78+ }
79+
80+ public void setEmail (String email ) {
81+ this .email = email ;
82+ }
83+
6884 public FeatureProposal getFeatureProposal () {
6985 return featureProposal ;
7086 }
0 commit comments