Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
refactor : 기본생성자 accessLevel 수정
Browse files Browse the repository at this point in the history
1. 기본 생성자 accessLevel Protected로 수정
  • Loading branch information
kihyuk-jeong committed May 10, 2021
1 parent 37d98e2 commit 029ea74
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Address toEntity() {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class IdRequest {
private Long id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.flab.shoeauction.domain.brand.Brand;
import javax.validation.constraints.NotBlank;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -11,7 +12,7 @@ public class BrandDto {

@Getter
@Builder
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
public static class SaveRequest {

Expand Down Expand Up @@ -44,7 +45,7 @@ public Brand toEntity() {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
public static class BrandInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
import com.flab.shoeauction.domain.users.user.User;
import com.flab.shoeauction.service.encrytion.EncryptionService;
import java.time.LocalDateTime;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

public class PointDto {

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class ChargeRequest {

private Long chargeAmount;
Expand All @@ -32,7 +33,7 @@ public Point toEntity(User user) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class WithdrawalRequest {

private Long withdrawalAmount;
Expand All @@ -58,7 +59,7 @@ public Point toEntity(User user) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class PointHistoryDto {

private LocalDateTime time;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -23,7 +24,7 @@
public class ProductDto {

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Builder
@AllArgsConstructor
public static class SaveRequest {
Expand Down Expand Up @@ -112,7 +113,7 @@ public void deleteImagePath() {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
public static class ProductInfoResponse {
Expand All @@ -138,7 +139,7 @@ public static class ProductInfoResponse {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
public static class ProductInfoByTrade {
Expand Down Expand Up @@ -166,7 +167,7 @@ public IdRequest(Long id) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class WishItemResponse {

private Long id;
Expand All @@ -189,7 +190,7 @@ public WishItemResponse(Long id, Long productId, String nameKor, String nameEng,

@Getter
@Builder
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
public static class ThumbnailResponse {

Expand All @@ -203,7 +204,7 @@ public static class ThumbnailResponse {

@Builder
@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
public static class SearchCondition {

Expand Down
15 changes: 8 additions & 7 deletions src/main/java/com/flab/shoeauction/controller/dto/TradeDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
import com.flab.shoeauction.domain.trade.Trade;
import com.flab.shoeauction.domain.trade.TradeStatus;
import com.flab.shoeauction.domain.users.user.User;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

public class TradeDto {

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class TradeResource {

private TradeUserInfo tradeUserInfo;
Expand All @@ -29,7 +30,7 @@ public TradeResource(
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class TradeBidResponse {

private Long tradeId;
Expand All @@ -47,7 +48,7 @@ public TradeBidResponse(Long tradeId, Long productId, double productSize, Long p
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class ChangeRequest {

private Long tradeId;
Expand All @@ -61,7 +62,7 @@ public ChangeRequest(Long tradeId, Long price) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class SaveRequest {

private Long price;
Expand Down Expand Up @@ -106,7 +107,7 @@ public Trade toEntityByBuyer(User user, Product product, Address address) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class ImmediateTradeRequest {

private Long tradeId;
Expand All @@ -122,7 +123,7 @@ public ImmediateTradeRequest(Long tradeId, Long addressId, Long productId) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class TrackingNumberRequest {

private String trackingNumber;
Expand All @@ -134,7 +135,7 @@ public TrackingNumberRequest(String trackingNumber) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class ReasonRequest {

private String reason;
Expand Down
32 changes: 13 additions & 19 deletions src/main/java/com/flab/shoeauction/controller/dto/UserDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@Builder
public class UserDto {

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class SaveRequest {

@NotBlank(message = "닉네임을 입력해주세요.")
Expand Down Expand Up @@ -71,7 +69,7 @@ public User toEntity() {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class SmsCertificationRequest {

private String phone;
Expand All @@ -86,7 +84,7 @@ public SmsCertificationRequest(String phone, String certificationNumber) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class EmailCertificationRequest {

private String email;
Expand All @@ -104,7 +102,7 @@ public EmailCertificationRequest(String email, String certificationNumber) {
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class LoginRequest {

private String email;
Expand All @@ -117,7 +115,7 @@ public void passwordEncryption(EncryptionService encryptionService) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class UserInfoDto {

private String email;
Expand Down Expand Up @@ -150,7 +148,7 @@ public FindUserResponse(String email, String phone) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class ChangePasswordRequest {

private String email;
Expand All @@ -177,7 +175,7 @@ public ChangePasswordRequest(String email,
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class PasswordRequest {

private String password;
Expand All @@ -189,7 +187,6 @@ public PasswordRequest(String password) {
}

@Getter
@NoArgsConstructor
public static class UserListResponse {

private Long id;
Expand All @@ -205,7 +202,7 @@ public UserListResponse(Long id, String email, UserLevel userLevel) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class UserSearchCondition {

private Long id;
Expand All @@ -221,7 +218,6 @@ public UserSearchCondition(Long id, String email, UserLevel userLevel) {
}

@Getter
@NoArgsConstructor
public static class UserDetailsResponse {

private Long id;
Expand Down Expand Up @@ -253,7 +249,7 @@ public UserDetailsResponse(Long id, String email, String nickname, String phone,
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class UserBanRequest {

private Long id;
Expand All @@ -267,7 +263,7 @@ public UserBanRequest(Long id, UserStatus userStatus) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class TradeUserInfo {

private AddressBook addressBook;
Expand All @@ -282,7 +278,7 @@ public TradeUserInfo(AddressBook addressBook,
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class TradeInfoResponse {

private Long id;
Expand All @@ -298,7 +294,7 @@ public TradeInfoResponse(Long id, TradeStatus status, String email) {
}

@Getter
@NoArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public static class TradeSearchCondition {
private Long tradeId;
private TradeStatus tradeStatus;
Expand All @@ -309,6 +305,4 @@ public TradeSearchCondition(Long tradeId, TradeStatus tradeStatus) {
this.tradeStatus = tradeStatus;
}
}


}

0 comments on commit 029ea74

Please sign in to comment.