-
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 pull request #146 from ItRecode/develop
version 0.1.1 배포
- Loading branch information
Showing
11 changed files
with
336 additions
and
3 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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/recordit/server/dto/record/RandomRecordRequestDto.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 com.recordit.server.dto.record; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiParam; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@ApiModel | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
public class RandomRecordRequestDto { | ||
@ApiParam(value = "카테고리 ID", required = true, example = "1") | ||
@NotNull | ||
private Long recordCategoryId; | ||
|
||
@ApiParam(value = "댓글 리스트의 사이즈", required = true, example = "5") | ||
@NotNull | ||
private Integer size; | ||
} |
49 changes: 49 additions & 0 deletions
49
src/main/java/com/recordit/server/dto/record/RandomRecordResponseDto.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,49 @@ | ||
package com.recordit.server.dto.record; | ||
|
||
import com.recordit.server.domain.Record; | ||
|
||
import io.swagger.annotations.ApiParam; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
public class RandomRecordResponseDto { | ||
@ApiParam(value = "레코드 ID", required = true) | ||
private Long recordId; | ||
|
||
@ApiParam(value = "레코드 제목", required = true) | ||
private String title; | ||
|
||
@ApiParam(value = "레코드 컬러명", required = true) | ||
private String colorName; | ||
|
||
@ApiParam(value = "레코드 아이콘명", required = true) | ||
private String iconName; | ||
|
||
@ApiParam(value = "댓글 개수", required = true) | ||
private Long commentCount; | ||
|
||
private RandomRecordResponseDto(Long recordId, String title, String colorName, String iconName, Long commentCount) { | ||
this.recordId = recordId; | ||
this.title = title; | ||
this.colorName = colorName; | ||
this.iconName = iconName; | ||
this.commentCount = commentCount; | ||
} | ||
|
||
public static RandomRecordResponseDto of( | ||
Record record, | ||
Long commentCount | ||
) { | ||
return new RandomRecordResponseDto( | ||
record.getId(), | ||
record.getTitle(), | ||
record.getRecordColor().getName(), | ||
record.getRecordIcon().getName(), | ||
commentCount | ||
); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/com/recordit/server/dto/record/mix/MixRecordDto.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,45 @@ | ||
package com.recordit.server.dto.record.mix; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@ApiModel | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class MixRecordDto { | ||
@ApiModelProperty(notes = "믹스 레코드 아이디") | ||
private Long recordId; | ||
|
||
@ApiModelProperty(notes = "믹스 레코드 색상이름") | ||
private String colorName; | ||
|
||
@ApiModelProperty(notes = "믹스 레코드 아이콘이름") | ||
private String iconName; | ||
|
||
@ApiModelProperty(notes = "믹스 레코드 댓글 아이디") | ||
private Long commentId; | ||
|
||
@ApiModelProperty(notes = "믹스 레코드 댓글 내용") | ||
private String commentContent; | ||
|
||
@Builder | ||
public MixRecordDto( | ||
Long recordId, | ||
String colorName, | ||
String iconName, | ||
Long commentId, | ||
String commentContent | ||
) { | ||
this.recordId = recordId; | ||
this.colorName = colorName; | ||
this.iconName = iconName; | ||
this.commentId = commentId; | ||
this.commentContent = commentContent; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/recordit/server/dto/record/mix/MixRecordResponseDto.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,25 @@ | ||
package com.recordit.server.dto.record.mix; | ||
|
||
import java.util.List; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@ApiModel | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class MixRecordResponseDto { | ||
@ApiModelProperty(notes = "믹스레코드 리스트") | ||
private List<MixRecordDto> mixRecordDto; | ||
|
||
@Builder | ||
public MixRecordResponseDto(List<MixRecordDto> mixRecordDto) { | ||
this.mixRecordDto = mixRecordDto; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/com/recordit/server/exception/record/FixRecordNotExistException.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 com.recordit.server.exception.record; | ||
|
||
public class FixRecordNotExistException extends RuntimeException { | ||
public FixRecordNotExistException(String message) { | ||
super(message); | ||
} | ||
} |
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
Oops, something went wrong.