-
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
Showing
22 changed files
with
725 additions
and
306 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/main/java/com/uspray/uspray/DTO/category/CategoryRequestDto.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,36 @@ | ||
package com.uspray.uspray.DTO.category; | ||
|
||
import com.uspray.uspray.domain.Category; | ||
import com.uspray.uspray.domain.Member; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Schema(description = "카테고리 DTO") | ||
public class CategoryRequestDto { | ||
|
||
@NotNull | ||
@Schema(description = "카테고리 이름", example = "카테고리 이름") | ||
private String name; | ||
|
||
@NotNull | ||
@Schema(description = "카테고리 색상", example = "#FFFFFF") | ||
private String color; | ||
|
||
|
||
public Category toEntity(Member member) { | ||
return Category.builder() | ||
.name(name) | ||
.color(color) | ||
.member(member) | ||
.build(); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/com/uspray/uspray/DTO/category/CategoryResponseDto.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,35 @@ | ||
package com.uspray.uspray.DTO.category; | ||
|
||
import com.uspray.uspray.domain.Category; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@Builder | ||
@NoArgsConstructor | ||
public class CategoryResponseDto { | ||
|
||
@Schema(description = "카테고리 ID", example = "1") | ||
private Long id; | ||
|
||
@Schema(description = "카테고리 소유자 ID", example = "1") | ||
private Long memberId; | ||
|
||
@Schema(description = "카테고리 이름", example = "카테고리 이름") | ||
private String name; | ||
|
||
@Schema(description = "카테고리 색상", example = "#FFFFFF") | ||
private String color; | ||
|
||
@Schema(description = "카테고리 순서", example = "1") | ||
private Integer order; | ||
|
||
public static CategoryResponseDto of(Category category) { | ||
return new CategoryResponseDto(category.getId(), category.getMember().getId(), | ||
category.getName(), category.getColor(), category.getOrder()); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/uspray/uspray/DTO/pray/PrayListResponseDto.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,20 @@ | ||
package com.uspray.uspray.DTO.pray; | ||
|
||
import com.uspray.uspray.DTO.pray.request.PrayResponseDto; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@Builder | ||
@NoArgsConstructor | ||
public class PrayListResponseDto { | ||
|
||
@Schema(description = "카테고리 ID", example = "1") | ||
private Long categoryId; | ||
private List<PrayResponseDto> prays; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.uspray.uspray.Enums; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE) | ||
public enum PrayType { | ||
SHARED("공유 기도"), | ||
PERSONAL("개인 기도"), | ||
GROUP("그룹 기도"), | ||
; | ||
private final String title; | ||
} |
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
Oops, something went wrong.