-
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.
* chore: 경험 선물 상세 API note 컬럼 추가 * feat: 경험선물 <-> 경험카테고리, 경험선물 <-> 상황카테고리 맵핑 엔티티 생성 * feat: 경험 선물 인기순 정렬 Paging API 구현 * feat: 경험 선물 상황/경험별 선물을, 인기/가격높은순/가격낮은순에 따라 정렬 후 Response API 구현 * chore: 코드 정리
- Loading branch information
Showing
15 changed files
with
440 additions
and
218 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
34 changes: 34 additions & 0 deletions
34
src/main/java/com/shallwe/domain/experiencegift/domain/ExperienceGiftExperienceCategory.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,34 @@ | ||
package com.shallwe.domain.experiencegift.domain; | ||
|
||
import com.shallwe.domain.common.BaseEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "experience_gift_experience_category") | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Getter | ||
public class ExperienceGiftExperienceCategory extends BaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY, optional = false) | ||
@JoinColumn(nullable = false, name = "experience_gift_id") | ||
private ExperienceGift experienceGift; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY, optional = false) | ||
@JoinColumn(nullable = false, name = "experience_category_id") | ||
private ExperienceCategory experienceCategory; | ||
|
||
@Builder | ||
public ExperienceGiftExperienceCategory(ExperienceGift experienceGift, ExperienceCategory experienceCategory) { | ||
this.experienceGift = experienceGift; | ||
this.experienceCategory = experienceCategory; | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/com/shallwe/domain/experiencegift/domain/ExperienceGiftSituationCategory.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 com.shallwe.domain.experiencegift.domain; | ||
|
||
import com.shallwe.domain.common.BaseEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "experience_gift_situation_category") | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Getter | ||
public class ExperienceGiftSituationCategory extends BaseEntity { | ||
|
||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY, optional = false) | ||
@JoinColumn(nullable = false, name = "experience_gift_id") | ||
private ExperienceGift experienceGift; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY, optional = false) | ||
@JoinColumn(nullable = false, name = "situation_category_id") | ||
private SituationCategory situationCategory; | ||
|
||
@Builder | ||
public ExperienceGiftSituationCategory(ExperienceGift experienceGift, SituationCategory situationCategory) { | ||
this.experienceGift = experienceGift; | ||
this.situationCategory = situationCategory; | ||
} | ||
|
||
} |
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
24 changes: 24 additions & 0 deletions
24
src/main/java/com/shallwe/domain/experiencegift/dto/response/ExperienceGiftRes.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,24 @@ | ||
package com.shallwe.domain.experiencegift.dto.response; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class ExperienceGiftRes { | ||
|
||
private Long experienceGiftId; | ||
private String giftImgUrl; | ||
private String subtitle; | ||
private String title; | ||
private Long price; | ||
|
||
@QueryProjection | ||
public ExperienceGiftRes(Long experienceGiftId, String giftImgUrl, String subtitle, String title, Long price) { | ||
this.experienceGiftId = experienceGiftId; | ||
this.giftImgUrl = giftImgUrl; | ||
this.subtitle = subtitle; | ||
this.title = title; | ||
this.price = price; | ||
} | ||
|
||
} |
Oops, something went wrong.