File tree Expand file tree Collapse file tree 9 files changed +48
-41
lines changed
java/com/pwr/students/domain
resources/config/liquibase/fake-data
test/java/com/pwr/students/web/rest Expand file tree Collapse file tree 9 files changed +48
-41
lines changed Original file line number Diff line number Diff line change
1
+ package com .pwr .students .domain ;
2
+
3
+ public enum AnswerType {
4
+ SLIDER ,
5
+ TEXT ,
6
+ RADIO ,
7
+ }
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ public class Question implements Serializable {
29
29
30
30
@ NotNull
31
31
@ Column (name = "answer_type" , nullable = false )
32
- private String answerType ;
32
+ @ Enumerated (EnumType .STRING )
33
+ private AnswerType answerType ;
33
34
34
35
@ NotNull
35
36
@ Size (min = 16 , max = 255 )
@@ -75,16 +76,16 @@ public void setCategory(String category) {
75
76
this .category = category ;
76
77
}
77
78
78
- public String getAnswerType () {
79
+ public AnswerType getAnswerType () {
79
80
return this .answerType ;
80
81
}
81
82
82
- public Question answerType (String answerType ) {
83
+ public Question answerType (AnswerType answerType ) {
83
84
this .setAnswerType (answerType );
84
85
return this ;
85
86
}
86
87
87
- public void setAnswerType (String answerType ) {
88
+ public void setAnswerType (AnswerType answerType ) {
88
89
this .answerType = answerType ;
89
90
}
90
91
Original file line number Diff line number Diff line change 1
1
package com .pwr .students .domain ;
2
2
3
3
import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
4
- import com .pwr .students .repository .SurveyStatus ;
5
4
import jakarta .persistence .*;
6
5
import jakarta .validation .constraints .*;
7
6
import java .io .Serializable ;
Original file line number Diff line number Diff line change 1
- package com .pwr .students .repository ;
1
+ package com .pwr .students .domain ;
2
2
3
3
public enum SurveyStatus {
4
4
DRAFT ,
Original file line number Diff line number Diff line change 1
1
id;category;answer_type;question_content;is_required;jhi_order;survey_id
2
- 1;attitude;calculate Infrastructure ;including Networked;true;44743;1
3
- 2;Integration Berkshire up;Rubber;revolutionary above Jazz ;true;48233;2
4
- 3;Jazz;XML;Classical Chevrolet who ;true;75409;3
5
- 4;sensor Phased;Engineer firewall Northwest ;orchestration Palladium;true;33686;4
6
- 5;Account provided;Jersey capacitor Thiel ;VanXXXXXXXXXXXXX;true;91402;5
7
- 6;strategic lame;since Screen Country ;lens Principal CSS;true;73489;6
8
- 7;cyan Denver ferociously;Southwest ;to SouthXXXXXXXX;true;11450;7
9
- 8;Thorium Bowie;bluetooth brr ;Soap RubberXXXXX;true;17469;8
10
- 9;Forward;grey California ;Southeast Bacon Copernicium;false;26648;9
11
- 10;Czech New;benchmark invoice Rialto ;but Brakus South;true;60643;10
2
+ 1;attitude;TEXT ;including Networked;true;44743;1
3
+ 2;Integration Berkshire up;RADIO;whatever question content ;true;48233;2
4
+ 3;Jazz;SLIDER;whatever question content ;true;75409;3
5
+ 4;sensor Phased;TEXT ;orchestration Palladium;true;33686;4
6
+ 5;Account provided;TEXT ;VanXXXXXXXXXXXXX;true;91402;5
7
+ 6;strategic lame;TEXT ;lens Principal CSS;true;73489;6
8
+ 7;cyan Denver ferociously;SLIDER ;to SouthXXXXXXXX;true;11450;7
9
+ 8;Thorium Bowie;SLIDER ;Soap RubberXXXXX;true;17469;8
10
+ 9;Forward;RADIO ;Southeast Bacon Copernicium;false;26648;9
11
+ 10;Czech New;RADIO ;but Brakus South;true;60643;10
Original file line number Diff line number Diff line change 1
1
id;name;description;deadline;status
2
- 1;Division;BMW Pound Zealand;2023-05-09;weber Cheese
3
- 2;Auburn platforms;networks Architect;2023-05-10;Lauderhill Bedfordshire Chips
4
- 3;orchid;Drive ZirconiumX;2023-05-10;Principal
5
- 4;infomediaries Route;that EngineerXXX;2023-05-09;neutral incentivize
6
- 5;navigation synthesize next;Analyst matrix Interactions;2023-05-09;frozen Steel
7
- 6;backing holistic;Rupiah North Luxurious;2023-05-10;silky
8
- 7;neutral;panel consequently Operations;2023-05-10;withdrawal Account
9
- 8;Ohio avaricious Cisgender;CambridgeshireXX;2023-05-10;stable Wooden
10
- 9;Convertible oh;Hybrid KiaXXXXXX;2023-05-10;Account
11
- 10;IP Orland;kilogramXXXXXXXX;2023-05-10;Bicycle Markets
2
+ 1;Division;BMW Pound Zealand;2023-05-09;ACTIVE
3
+ 2;Auburn platforms;networks Architect;2023-05-10;ACTIVE
4
+ 3;orchid;Drive ZirconiumX;2023-05-10;ACTIVE
5
+ 4;infomediaries Route;that EngineerXXX;2023-05-09;ACTIVE
6
+ 5;navigation synthesize next;Analyst matrix Interactions;2023-05-09;ACTIVE
7
+ 6;backing holistic;Rupiah North Luxurious;2023-05-10;EXPIRED
8
+ 7;neutral;panel consequently Operations;2023-05-10;EXPIRED
9
+ 8;Ohio avaricious Cisgender;CambridgeshireXX;2023-05-10;EXPIRED
10
+ 9;Convertible oh;Hybrid KiaXXXXXX;2023-05-10;EXPIRED
11
+ 10;IP Orland;kilogramXXXXXXXX;2023-05-10;DRAFT
Original file line number Diff line number Diff line change 1
- id;is_finished
2
- 1;true
3
- 2;true
4
- 3;false
5
- 4;true
6
- 5;true
7
- 6;true
8
- 7;false
9
- 8;true
10
- 9;false
11
- 10;true
1
+ id;is_finished;survey_id;user_id
2
+ 1;true;1;1
3
+ 2;true;2;1
4
+ 3;false;3;1
5
+ 4;true;4;1
6
+ 5;true;5;1
7
+ 6;true;6;2
8
+ 7;false;7;2
9
+ 8;true;8;2
10
+ 9;false;9;2
11
+ 10;true;10;2
Original file line number Diff line number Diff line change 8
8
import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .*;
9
9
10
10
import com .pwr .students .IntegrationTest ;
11
+ import com .pwr .students .domain .AnswerType ;
11
12
import com .pwr .students .domain .Question ;
12
13
import com .pwr .students .repository .QuestionRepository ;
13
14
import jakarta .persistence .EntityManager ;
@@ -42,8 +43,8 @@ class QuestionResourceIT {
42
43
private static final String DEFAULT_CATEGORY = "AAAAAAAAAA" ;
43
44
private static final String UPDATED_CATEGORY = "BBBBBBBBBB" ;
44
45
45
- private static final String DEFAULT_ANSWER_TYPE = "AAAAAAAAAA" ;
46
- private static final String UPDATED_ANSWER_TYPE = "BBBBBBBBBB" ;
46
+ private static final AnswerType DEFAULT_ANSWER_TYPE = AnswerType . TEXT ;
47
+ private static final AnswerType UPDATED_ANSWER_TYPE = AnswerType . RADIO ;
47
48
48
49
private static final String DEFAULT_QUESTION_CONTENT = "AAAAAAAAAAAAAAAA" ;
49
50
private static final String UPDATED_QUESTION_CONTENT = "BBBBBBBBBBBBBBBB" ;
Original file line number Diff line number Diff line change 9
9
10
10
import com .pwr .students .IntegrationTest ;
11
11
import com .pwr .students .domain .Survey ;
12
+ import com .pwr .students .domain .SurveyStatus ;
12
13
import com .pwr .students .repository .SurveyRepository ;
13
- import com .pwr .students .repository .SurveyStatus ;
14
14
import jakarta .persistence .EntityManager ;
15
15
import java .time .LocalDate ;
16
16
import java .time .ZoneId ;
26
26
import org .springframework .beans .factory .annotation .Autowired ;
27
27
import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
28
28
import org .springframework .data .domain .PageImpl ;
29
- import org .springframework .data .domain .PageRequest ;
30
29
import org .springframework .data .domain .Pageable ;
31
30
import org .springframework .http .MediaType ;
32
31
import org .springframework .security .test .context .support .WithMockUser ;
You can’t perform that action at this time.
0 commit comments