Skip to content

Commit

Permalink
Merge pull request #101 from jyjyjy25/feature/#99-ott-id
Browse files Browse the repository at this point in the history
  • Loading branch information
jyjyjy25 authored Jan 18, 2024
2 parents 4b927f6 + 143f926 commit 6901928
Show file tree
Hide file tree
Showing 30 changed files with 474 additions and 263 deletions.
Binary file modified .DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ public class GenreShowSavedController {

private final GenreShowSavedService genreShowSavedService;

@ApiOperation(value = "์ €์žฅ๋œ ์žฅ๋ฅด ๋ฆฌ์ŠคํŠธ๋“ค์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค", notes = "์žฅ๋ฅด ์ €์žฅ์‹œ ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค")
@ApiOperation(value = "์ €์žฅ๋œ ์žฅ๋ฅด ๋ฆฌ์ŠคํŠธ๋“ค์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค", notes = "์žฅ๋ฅด ์กฐํšŒ ์‹œ ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.")
@GetMapping("/api/v1/show/saved/genre")
@ResponseStatus(HttpStatus.OK)
public BaseResponse<GenreShowSavedListDto> showGenreSavedList() {
return BaseResponse.success(genreShowSavedService.showGenreList());
}


}
4 changes: 4 additions & 0 deletions src/main/java/tavebalak/OTTify/genre/dto/GenreDTO.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package tavebalak.OTTify.genre.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Getter;
import tavebalak.OTTify.genre.entity.UserGenre;

@Getter
public class GenreDTO {
@ApiModelProperty(value = "์žฅ๋ฅด id")
private Long id;

@ApiModelProperty(value = "์žฅ๋ฅด ์ด๋ฆ„")
private String name;

public GenreDTO(UserGenre ug) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package tavebalak.OTTify.program.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import tavebalak.OTTify.common.BaseResponse;
import tavebalak.OTTify.program.dto.response.OttListDTO;
import tavebalak.OTTify.program.service.OttService;

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/saved/ott")
@Api(tags = {"OTT ์ปจํŠธ๋กค๋Ÿฌ"})
public class OttSavedController {

private final OttService ottService;

@ApiOperation(value = "์ €์žฅ๋œ OTT ๋ฆฌ์ŠคํŠธ ์กฐํšŒ", notes = "์ €์žฅ๋œ ๋ชจ๋“  OTT์˜ ์•„์ด๋””์™€ ์ด๋ฆ„์„ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponse(code = 200, message = "์„ฑ๊ณต์ ์œผ๋กœ ์ €์žฅ๋œ OTT ๋ฆฌ์ŠคํŠธ๋ฅผ ์กฐํšŒํ•˜์˜€์Šต๋‹ˆ๋‹ค.")
@GetMapping("")
@ResponseStatus(HttpStatus.OK)
public BaseResponse<OttListDTO> getOttList() {
return BaseResponse.success(ottService.getOttList());
}
}
21 changes: 21 additions & 0 deletions src/main/java/tavebalak/OTTify/program/dto/response/OttDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package tavebalak.OTTify.program.dto.response;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import tavebalak.OTTify.program.entity.Ott;

@Getter
@NoArgsConstructor
public class OttDTO {
@ApiModelProperty(value = "OTT id")
private Long id;

@ApiModelProperty(value = "OTT ์ด๋ฆ„")
private String name;

public OttDTO(Ott ott) {
this.id = ott.getId();
this.name = ott.getName();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package tavebalak.OTTify.program.dto.response;

import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Getter
@NoArgsConstructor
public class OttListDTO {
List<OttDTO> ottList = new ArrayList<>();

public OttListDTO(List<OttDTO> ottList) {
this.ottList = ottList;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tavebalak.OTTify.program.service;

import tavebalak.OTTify.program.dto.response.OttListDTO;

public interface OttService {
OttListDTO getOttList();
}
28 changes: 28 additions & 0 deletions src/main/java/tavebalak/OTTify/program/service/OttServiceImpl.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package tavebalak.OTTify.program.service;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tavebalak.OTTify.program.dto.response.OttDTO;
import tavebalak.OTTify.program.dto.response.OttListDTO;
import tavebalak.OTTify.program.repository.OttRepository;

import java.util.List;
import java.util.stream.Collectors;

@Service
@Transactional(readOnly = true)
@RequiredArgsConstructor
public class OttServiceImpl implements OttService {

private final OttRepository ottRepository;

@Override
public OttListDTO getOttList() {
List<OttDTO> ottDTOList = ottRepository.findAll().stream()
.map(OttDTO::new)
.collect(Collectors.toList());

return new OttListDTO(ottDTOList);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package tavebalak.OTTify.review.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -8,16 +9,37 @@
@NoArgsConstructor
public class UserReviewRatingListDTO {

@ApiModelProperty(value = "์ด ๋ฆฌ๋ทฐ ์ˆ˜")
private int totalCnt;

@ApiModelProperty(value = "0.5์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int pointFiveCnt;

@ApiModelProperty(value = "1์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int oneCnt;

@ApiModelProperty(value = "1.5์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int oneDotFiveCnt;

@ApiModelProperty(value = "2์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int twoCnt;

@ApiModelProperty(value = "2.5์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int twoDotFiveCnt;

@ApiModelProperty(value = "3์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int threeCnt;

@ApiModelProperty(value = "3.5์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int threeDotFiveCnt;

@ApiModelProperty(value = "4์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int fourCnt;

@ApiModelProperty(value = "4.5์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int fourDotFiveCnt;

@ApiModelProperty(value = "5์  ๋ฆฌ๋ทฐ ์ˆ˜")
private int fiveCnt;

@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
import tavebalak.OTTify.user.entity.User;

public interface ReviewRepository extends JpaRepository<Review, Long> {

Slice<Review> findByUserIdOrderByCreatedAt(@Param("userId") Long userId, Pageable pageable);
Slice<Review> findByUserIdOrderByCreatedAt(Long userId, Pageable pageable);

boolean existsByProgramAndUser(Program program, User user);

Optional<Review> findByProgramAndUser(Program program, User user);


List<Review> findTop4ByProgramOrderByLikeCountsDesc(Program program);

// Slice ๋กœ ์ „์ฒด ๋ฆฌ๋ทฐ ๊ฐ€์ ธ์˜ค๊ธฐ
Expand Down
68 changes: 38 additions & 30 deletions src/main/java/tavebalak/OTTify/user/controller/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public BaseResponse<UserOttListDTO> getUserOTT(@PathVariable("userId") Long user
@ApiResponse(code = 200, message = "์„ฑ๊ณต์ ์œผ๋กœ ํ”„๋กœํ•„์ด ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
@PatchMapping("/{userId}/profile")
@ResponseStatus(HttpStatus.OK)
public BaseResponse updateUserProfile(@PathVariable("userId") Long userId, @Validated @RequestBody UserProfileUpdateDTO updateRequestDTO) {
public BaseResponse updateUserProfile(@PathVariable("userId") Long userId,
@Validated @RequestBody UserProfileUpdateDTO updateRequestDTO) {
userService.updateUserProfile(userId, updateRequestDTO);
return BaseResponse.success("์„ฑ๊ณต์ ์œผ๋กœ ํ”„๋กœํ•„์ด ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.");
}
Expand All @@ -61,7 +62,8 @@ public BaseResponse updateUserProfile(@PathVariable("userId") Long userId, @Vali
@ApiResponse(code = 200, message = "์„ฑ๊ณต์ ์œผ๋กœ ๊ตฌ๋… ์ค‘์ธ OTT๊ฐ€ ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
@PatchMapping("/{userId}/otts")
@ResponseStatus(HttpStatus.OK)
public BaseResponse updateUserOTT(@PathVariable("userId") Long userId, @RequestBody UserOttUpdateDTO updateRequestDTO) {
public BaseResponse updateUserOTT(@PathVariable("userId") Long userId,
@RequestBody UserOttUpdateDTO updateRequestDTO) {
userService.updateUserOTT(userId, updateRequestDTO);
return BaseResponse.success("์„ฑ๊ณต์ ์œผ๋กœ ๊ตฌ๋… ์ค‘์ธ OTT๊ฐ€ ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.");
}
Expand All @@ -71,7 +73,8 @@ public BaseResponse updateUserOTT(@PathVariable("userId") Long userId, @RequestB
@ApiResponse(code = 200, message = "์„ฑ๊ณต์ ์œผ๋กœ 1์ˆœ์œ„ ์žฅ๋ฅด๊ฐ€ ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
@PatchMapping("/{userId}/1stGenre")
@ResponseStatus(HttpStatus.OK)
public BaseResponse update1stLikedGenre(@PathVariable("userId") Long userId, @Validated @RequestBody GenreUpdateDTO updateRequestDto) {
public BaseResponse update1stLikedGenre(@PathVariable("userId") Long userId,
@Validated @RequestBody GenreUpdateDTO updateRequestDto) {
userService.update1stGenre(userId, updateRequestDto);
return BaseResponse.success("์„ฑ๊ณต์ ์œผ๋กœ 1์ˆœ์œ„ ์žฅ๋ฅด๊ฐ€ ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.");
}
Expand All @@ -81,22 +84,24 @@ public BaseResponse update1stLikedGenre(@PathVariable("userId") Long userId, @Va
@ApiResponse(code = 200, message = "์„ฑ๊ณต์ ์œผ๋กœ 2์ˆœ์œ„ ์žฅ๋ฅด๊ฐ€ ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
@PatchMapping("/{userId}/2ndGenre")
@ResponseStatus(HttpStatus.OK)
public BaseResponse update2ndLikedGenre(@PathVariable("userId") Long userId, @Validated @RequestBody GenreUpdateDTO updateRequestDTO) {
public BaseResponse update2ndLikedGenre(@PathVariable("userId") Long userId,
@Validated @RequestBody GenreUpdateDTO updateRequestDTO) {
userService.update2ndGenre(userId, updateRequestDTO);
return BaseResponse.success("์„ฑ๊ณต์ ์œผ๋กœ 2์ˆœ์œ„ ์žฅ๋ฅด๊ฐ€ ์—…๋ฐ์ดํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.");
}

@ApiOperation(value = "์ž‘์„ฑ ๋ฆฌ๋ทฐ ์กฐํšŒ api", notes = "์œ ์ €๊ฐ€ ์ž‘์„ฑํ•œ ๋ฆฌ๋ทฐ๋ฅผ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", required = false, paramType = "path"),
@ApiImplicitParam(name = "direction", dataType = "String", value = "๋‚ด๋ฆผ์ฐจ์ˆœ๊ณผ ์˜ค๋ฆ„์ฐจ์ˆœ", required = false, paramType = "path"),
@ApiImplicitParam(name = "sort", dataType = "String", value = "์ •๋ ฌ๊ธฐ์ค€(createdAt, updatedAt)", required = false, paramType = "path"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", required = false, paramType = "path")
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", paramType = "query"),
@ApiImplicitParam(name = "direction", dataType = "String", value = "๋‚ด๋ฆผ์ฐจ์ˆœ๊ณผ ์˜ค๋ฆ„์ฐจ์ˆœ", paramType = "query"),
@ApiImplicitParam(name = "sort", dataType = "String", value = "์ •๋ ฌ๊ธฐ์ค€(createdAt, updatedAt)", paramType = "query"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", paramType = "query")
})
@GetMapping("/{userId}/reviews")
@ResponseStatus(HttpStatus.OK)
public BaseResponse<List<MyReviewDto>> getMyReview(@PathVariable("userId") Long userId, @PageableDefault(
public BaseResponse<List<MyReviewDto>> getMyReview(@PathVariable("userId") Long userId,
@PageableDefault(
size = 5,
sort = "createdAt",
direction = Sort.Direction.DESC,
Expand All @@ -106,47 +111,50 @@ public BaseResponse<List<MyReviewDto>> getMyReview(@PathVariable("userId") Long

@ApiOperation(value = "์ข‹์•„์š”ํ•œ ๋ฆฌ๋ทฐ ์กฐํšŒ api", notes = "์œ ์ €๊ฐ€ ์ข‹์•„์š”ํ•œ ๋ฆฌ๋ทฐ๋ฅผ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", required = false, paramType = "path"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", required = false, paramType = "path")
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", paramType = "query"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", paramType = "query")
})
@GetMapping("/{userId}/likedReviews")
@ResponseStatus(HttpStatus.OK)
public BaseResponse<List<MyReviewDto>> getLikedReview(@PathVariable("userId") Long userId, @PageableDefault(
public BaseResponse<List<MyReviewDto>> getLikedReview(@PathVariable("userId") Long userId,
@PageableDefault(
size = 5,
page = 0) Pageable pageable) {
return BaseResponse.success(userService.getLikedReview(userId, pageable));
}

@ApiOperation(value = "์ฃผ์ตœํ•œ ํ† ๋ก  ์กฐํšŒ api", notes = "์œ ์ €๊ฐ€ ์ฃผ์ตœํ•œ ํ† ๋ก ์„ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", required = false, paramType = "path"),
@ApiImplicitParam(name = "direction", dataType = "String", value = "๋‚ด๋ฆผ์ฐจ์ˆœ๊ณผ ์˜ค๋ฆ„์ฐจ์ˆœ", required = false, paramType = "path"),
@ApiImplicitParam(name = "sort", dataType = "String", value = "์ •๋ ฌ๊ธฐ์ค€(createdAt, updatedAt)", required = false, paramType = "path"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", required = false, paramType = "path")
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", paramType = "query"),
@ApiImplicitParam(name = "direction", dataType = "String", value = "๋‚ด๋ฆผ์ฐจ์ˆœ๊ณผ ์˜ค๋ฆ„์ฐจ์ˆœ", paramType = "query"),
@ApiImplicitParam(name = "sort", dataType = "String", value = "์ •๋ ฌ๊ธฐ์ค€(createdAt, updatedAt)", paramType = "query"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", paramType = "query")
})
@GetMapping("/{userId}/discussion/hosting")
@ResponseStatus(HttpStatus.OK)
public BaseResponse<List<MyDiscussionDto>> getHostedDiscussion(@PathVariable("userId") Long userId, @PageableDefault(
size = 5,
sort = "createdAt",
direction = Sort.Direction.DESC,
page = 0) Pageable pageable) {
public BaseResponse<List<MyDiscussionDto>> getHostedDiscussion(
@PathVariable("userId") Long userId, @PageableDefault(
size = 5,
sort = "createdAt",
direction = Sort.Direction.DESC,
page = 0) Pageable pageable) {
return BaseResponse.success(userService.getHostedDiscussion(userId, pageable));
}

@ApiOperation(value = "์ฐธ์—ฌํ•œ ํ† ๋ก  ์กฐํšŒ api", notes = "์œ ์ €๊ฐ€ ์ฐธ์—ฌํ•œ ํ† ๋ก ์„ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", required = false, paramType = "path"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", required = false, paramType = "path")
@ApiImplicitParam(name = "userId", dataType = "long", value = "์œ ์ € id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", dataType = "int", value = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ(0๋ถ€ํ„ฐ ์‹œ์ž‘)", paramType = "query"),
@ApiImplicitParam(name = "size", dataType = "int", value = "ํŽ˜์ด์ง€๋‹น ์•„์ดํ…œ ๊ฐฏ์ˆ˜", paramType = "query")
})
@GetMapping("/{userId}/discussion/participating")
@ResponseStatus(HttpStatus.OK)
public BaseResponse<List<MyDiscussionDto>> getParticipatedDiscussion(@PathVariable("userId") Long userId, @PageableDefault(
size = 5,
page = 0) Pageable pageable) {
public BaseResponse<List<MyDiscussionDto>> getParticipatedDiscussion(
@PathVariable("userId") Long userId, @PageableDefault(
size = 5,
page = 0) Pageable pageable) {
return BaseResponse.success(userService.getParticipatedDiscussion(userId, pageable));
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package tavebalak.OTTify.user.dto.Request;

import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.List;

@Getter
@NoArgsConstructor
public class UserOttUpdateDTO {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package tavebalak.OTTify.user.dto.Request;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Getter
@NoArgsConstructor
public class UserProfileUpdateDTO {

@NotNull(message = "๋‹‰๋„ค์ž„์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Pattern(regexp = "^[ใ„ฑ-ใ…Ž๊ฐ€-ํžฃa-z0-9-_]{2,10}$", message="๋‹‰๋„ค์ž„์€ ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ์ œ์™ธํ•œ 2 ~ 10์ž๋ฆฌ์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.")
@Length(min=2, max=10, message="๋‹‰๋„ค์ž„์€ 2์ž ์ด์ƒ, 10์ž ์ดํ•˜๋กœ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”")
private String nickName;
@NotNull(message = "๋‹‰๋„ค์ž„์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Pattern(regexp = "^[ใ„ฑ-ใ…Ž๊ฐ€-ํžฃa-z0-9-_]{2,10}$", message = "๋‹‰๋„ค์ž„์€ ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ์ œ์™ธํ•œ 2 ~ 10์ž๋ฆฌ์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.")
@Length(min = 2, max = 10, message = "๋‹‰๋„ค์ž„์€ 2์ž ์ด์ƒ, 10์ž ์ดํ•˜๋กœ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”")
private String nickName;

@NotNull(message = "์‚ฌ์ง„์„ ์—…๋กœ๋“œํ•ด์ฃผ์„ธ์š”.")
private String profilePhoto;
@NotNull(message = "์‚ฌ์ง„์„ ์—…๋กœ๋“œํ•ด์ฃผ์„ธ์š”.")
private String profilePhoto;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package tavebalak.OTTify.user.dto.Response;

import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
public class LikedProgramDTO {

@ApiModelProperty(value = "ํ”„๋กœ๊ทธ๋žจ id")
private Long programId;

@ApiModelProperty(value = "ํ”„๋กœ๊ทธ๋žจ ํฌ์Šคํ„ฐ url")
private String posterPath;

@Builder
Expand Down
Loading

0 comments on commit 6901928

Please sign in to comment.