-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1068573
commit 6404d26
Showing
23 changed files
with
259 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
...main/java/com/codingwasabi/trti/domain/result/model/response/ResponseResultDetailDto.java
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/main/java/com/codingwasabi/trti/domain/result/model/response/ResponseResultDto.java
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
src/main/java/com/codingwasabi/trti/domain/result/model/values/AnswerType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
import com.codingwasabi.trti.domain.common.Period; | ||
import lombok.AllArgsConstructor; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.*; | ||
|
||
@Entity | ||
@Inheritance(strategy = InheritanceType.JOINED) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@DiscriminatorColumn(name = "answer_type") | ||
public abstract class AnswerType extends Period implements CountChanger { | ||
@Id | ||
@GeneratedValue | ||
private Long id; | ||
|
||
private boolean isAgreed = false; | ||
|
||
private int count0 = 0; | ||
|
||
private int count1 = 0; | ||
|
||
private int selected; | ||
|
||
@Override | ||
public void addCount0() { | ||
this.count0 ++; | ||
} | ||
|
||
@Override | ||
public void addCount1() { | ||
this.count1++; | ||
} | ||
|
||
@Override | ||
public void minusCount0() { | ||
this.count0--; | ||
} | ||
|
||
@Override | ||
public void minusCount1() { | ||
this.count1--; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/codingwasabi/trti/domain/result/model/values/CountChanger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
public interface CountChanger { | ||
void addCount0(); | ||
|
||
void addCount1(); | ||
|
||
void minusCount0(); | ||
|
||
void minusCount1(); | ||
} |
6 changes: 0 additions & 6 deletions
6
src/main/java/com/codingwasabi/trti/domain/result/model/values/Time.java
This file was deleted.
Oops, something went wrong.
17 changes: 14 additions & 3 deletions
17
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToActive.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
public enum ToActive { | ||
STATIC, | ||
DYNAMIC; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@DiscriminatorValue("TOACTIVE") | ||
public class ToActive extends AnswerType { | ||
@Transient | ||
private final int ID = 7; | ||
} |
6 changes: 0 additions & 6 deletions
6
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToEat.java
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToEat_1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@DiscriminatorValue("TOEAT_1") | ||
public class ToEat_1 extends AnswerType { | ||
@Transient | ||
private final int ID = 2; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToEat_2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@DiscriminatorValue("TOEAT_2") | ||
public class ToEat_2 extends AnswerType { | ||
@Transient | ||
private final int ID = 3; | ||
} |
6 changes: 0 additions & 6 deletions
6
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToMove.java
This file was deleted.
Oops, something went wrong.
17 changes: 14 additions & 3 deletions
17
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToStay.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
public enum ToStay { | ||
CHEAP, | ||
EXPENSIVE; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@DiscriminatorValue("TOSTAY") | ||
public class ToStay extends AnswerType { | ||
@Transient | ||
private final int ID = 1; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToStay_1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@DiscriminatorValue("TOSTAY_!") | ||
public class ToStay_1 extends AnswerType { | ||
@Transient | ||
private final int ID = 4; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToStay_2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@DiscriminatorValue("TOSTAY_2") | ||
public class ToStay_2 extends AnswerType { | ||
@Transient | ||
private final int ID =5; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/codingwasabi/trti/domain/result/model/values/ToStay_3.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.codingwasabi.trti.domain.result.model.values; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@DiscriminatorValue("TOSTAY_3") | ||
public class ToStay_3 extends AnswerType { | ||
@Transient | ||
private final int ID = 6; | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/codingwasabi/trti/util/survey/SurveyHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.codingwasabi.trti.util.survey; | ||
|
||
import com.codingwasabi.trti.domain.result.model.Result; | ||
import com.codingwasabi.trti.util.survey.dto.RequestSurveyDto; | ||
|
||
public interface SurveyHandler { | ||
Result proceed(RequestSurveyDto requestDto); | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/codingwasabi/trti/util/survey/dto/RequestAnswerDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.codingwasabi.trti.util.survey.dto; | ||
|
||
public class RequestAnswerDto { | ||
private Long id; | ||
private Integer answer; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/codingwasabi/trti/util/survey/dto/RequestSurveyDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.codingwasabi.trti.util.survey.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public class RequestSurveyDto { | ||
private List<RequestAnswerDto> answers; | ||
} |
Oops, something went wrong.