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 {
2929
3030 @ NotNull
3131 @ Column (name = "answer_type" , nullable = false )
32- private String answerType ;
32+ @ Enumerated (EnumType .STRING )
33+ private AnswerType answerType ;
3334
3435 @ NotNull
3536 @ Size (min = 16 , max = 255 )
@@ -75,16 +76,16 @@ public void setCategory(String category) {
7576 this .category = category ;
7677 }
7778
78- public String getAnswerType () {
79+ public AnswerType getAnswerType () {
7980 return this .answerType ;
8081 }
8182
82- public Question answerType (String answerType ) {
83+ public Question answerType (AnswerType answerType ) {
8384 this .setAnswerType (answerType );
8485 return this ;
8586 }
8687
87- public void setAnswerType (String answerType ) {
88+ public void setAnswerType (AnswerType answerType ) {
8889 this .answerType = answerType ;
8990 }
9091
Original file line number Diff line number Diff line change 11package com .pwr .students .domain ;
22
33import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
4- import com .pwr .students .repository .SurveyStatus ;
54import jakarta .persistence .*;
65import jakarta .validation .constraints .*;
76import 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 ;
22
33public enum SurveyStatus {
44 DRAFT ,
Original file line number Diff line number Diff line change 11id;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 11id;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 88import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .*;
99
1010import com .pwr .students .IntegrationTest ;
11+ import com .pwr .students .domain .AnswerType ;
1112import com .pwr .students .domain .Question ;
1213import com .pwr .students .repository .QuestionRepository ;
1314import jakarta .persistence .EntityManager ;
@@ -42,8 +43,8 @@ class QuestionResourceIT {
4243 private static final String DEFAULT_CATEGORY = "AAAAAAAAAA" ;
4344 private static final String UPDATED_CATEGORY = "BBBBBBBBBB" ;
4445
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 ;
4748
4849 private static final String DEFAULT_QUESTION_CONTENT = "AAAAAAAAAAAAAAAA" ;
4950 private static final String UPDATED_QUESTION_CONTENT = "BBBBBBBBBBBBBBBB" ;
Original file line number Diff line number Diff line change 99
1010import com .pwr .students .IntegrationTest ;
1111import com .pwr .students .domain .Survey ;
12+ import com .pwr .students .domain .SurveyStatus ;
1213import com .pwr .students .repository .SurveyRepository ;
13- import com .pwr .students .repository .SurveyStatus ;
1414import jakarta .persistence .EntityManager ;
1515import java .time .LocalDate ;
1616import java .time .ZoneId ;
2626import org .springframework .beans .factory .annotation .Autowired ;
2727import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
2828import org .springframework .data .domain .PageImpl ;
29- import org .springframework .data .domain .PageRequest ;
3029import org .springframework .data .domain .Pageable ;
3130import org .springframework .http .MediaType ;
3231import org .springframework .security .test .context .support .WithMockUser ;
You can’t perform that action at this time.
0 commit comments