-
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.
Merge branch 'main' of https://github.com/LikeLion-12th-SKHU/LikeLion…
- Loading branch information
Showing
13 changed files
with
211 additions
and
2 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/net/skhu/likelion12thteam03be/SelectColor/domain/SelectColor.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,33 @@ | ||
package net.skhu.likelion12thteam03be.SelectColor.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import net.skhu.likelion12thteam03be.survey.domain.Survey; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class SelectColor { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "selectColor_id") | ||
private Long id; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "survey_id") | ||
Survey survey; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "color_id") | ||
SelectColor selectColor; | ||
|
||
@Builder | ||
public SelectColor(Long id, Survey survey, SelectColor selectColor) { | ||
this.id = id; | ||
this.survey = survey; | ||
this.selectColor = selectColor; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...va/net/skhu/likelion12thteam03be/SelectColor/domain/repository/SelectColorRepository.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,7 @@ | ||
package net.skhu.likelion12thteam03be.SelectColor.domain.repository; | ||
|
||
import net.skhu.likelion12thteam03be.SelectColor.domain.SelectColor; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface SelectColorRepository extends JpaRepository<SelectColor, Long> { | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/net/skhu/likelion12thteam03be/color/domian/Color.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,29 @@ | ||
package net.skhu.likelion12thteam03be.color.domian; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Color { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "color_id") | ||
private Long id; | ||
|
||
private String name; | ||
private String mood; | ||
private String comment; | ||
|
||
@Builder | ||
public Color(Long id, String name, String mood, String comment) { | ||
this.id = id; | ||
this.name = name; | ||
this.mood = mood; | ||
this.comment = comment; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/net/skhu/likelion12thteam03be/color/domian/repository/ColorRepository.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,7 @@ | ||
package net.skhu.likelion12thteam03be.color.domian.repository; | ||
|
||
import net.skhu.likelion12thteam03be.color.domian.Color; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface ColorRepository extends JpaRepository<Color, Long> { | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/net/skhu/likelion12thteam03be/emotion/domain/Emotion.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,32 @@ | ||
package net.skhu.likelion12thteam03be.emotion.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Emotion { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Enumerated(EnumType.STRING) | ||
Emotions emotions; | ||
|
||
private String furniture; | ||
private String type; | ||
private String animalPic; | ||
|
||
@Builder | ||
public Emotion(Long id, Emotions emotions, String furniture, String type, String animalPic) { | ||
this.id = id; | ||
this.emotions = emotions; | ||
this.furniture = furniture; | ||
this.type = type; | ||
this.animalPic = animalPic; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/net/skhu/likelion12thteam03be/emotion/domain/Emotions.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,26 @@ | ||
package net.skhu.likelion12thteam03be.emotion.domain; | ||
|
||
public enum Emotions { // converter | ||
HAPPY("행복한"), | ||
HURRIED("괴로운"), | ||
DULL("암울한"), | ||
TOUCHED("감동적인"), | ||
EXCITING("신나는"), | ||
RELAXED("편안한"), | ||
FEARFUL("두려운"), | ||
INTERESTING("흥미로운"), | ||
NERVOUS("긴장한"), | ||
ANXIOUS("불안한"), | ||
JOYFUL("기쁜"), | ||
CONCERNED("걱정되는"), | ||
EXCITED("설레는"), | ||
WEAPON("무기력한"), | ||
FRUSTRATED("답답한"), | ||
FRESH("상쾌한"); | ||
|
||
private final String name; | ||
|
||
Emotions(String name) { | ||
this.name = name; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/net/skhu/likelion12thteam03be/emotion/domain/repository/EmotionRepository.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,7 @@ | ||
package net.skhu.likelion12thteam03be.emotion.domain.repository; | ||
|
||
import net.skhu.likelion12thteam03be.emotion.domain.Emotion; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface EmotionRepository extends JpaRepository<Emotion, Long> { | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/net/skhu/likelion12thteam03be/global/config/SecurityConfig.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
7 changes: 7 additions & 0 deletions
7
src/main/java/net/skhu/likelion12thteam03be/survey/api/SurveyController.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,7 @@ | ||
package net.skhu.likelion12thteam03be.survey.api; | ||
|
||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class SurveyController { | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/net/skhu/likelion12thteam03be/survey/application/SurveyService.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,4 @@ | ||
package net.skhu.likelion12thteam03be.survey.application; | ||
|
||
public class SurveyService { | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/net/skhu/likelion12thteam03be/survey/domain/Survey.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,44 @@ | ||
package net.skhu.likelion12thteam03be.survey.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import net.skhu.likelion12thteam03be.SelectColor.domain.SelectColor; | ||
import net.skhu.likelion12thteam03be.emotion.domain.Emotion; | ||
import net.skhu.likelion12thteam03be.user.domain.User; | ||
|
||
import java.util.List; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Survey { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "survey_id") | ||
private Long id; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "user_id") | ||
private User user; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "emotion_id") // 외래키 join | ||
Emotion emotion; | ||
|
||
@OneToMany(mappedBy = "survey") // color랑 manytomany 중간테이블 생성 | ||
private List<SelectColor> selectColorList; | ||
|
||
private int score; | ||
|
||
@Builder | ||
public Survey(Long id, User user, Emotion emotion, List<SelectColor> selectColorList, int score) { | ||
this.id = id; | ||
this.user = user; | ||
this.emotion = emotion; | ||
this.selectColorList = selectColorList; | ||
this.score = score; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/net/skhu/likelion12thteam03be/survey/domain/repository/SurveyRepository.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,7 @@ | ||
package net.skhu.likelion12thteam03be.survey.domain.repository; | ||
|
||
import net.skhu.likelion12thteam03be.survey.domain.Survey; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface SurveyRepository extends JpaRepository<Survey, Long> { | ||
} |
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