Skip to content

Commit

Permalink
[#89] rename: 공통 응답 모델 클래스명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeseul106 authored and rdd9223 committed Dec 9, 2023
1 parent 2124b14 commit a3e5d19
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.sopt.makers.crew.main.common.response;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CommonResponseDto<T> {

private final String errorCode;
private T data;

public static CommonResponseDto success(Object data) {
return CommonResponseDto.builder()
.data(data)
.build();
}


public static CommonResponseDto fail(String errorCode) {
return CommonResponseDto.builder()
.errorCode(errorCode)
.build();
}
}

0 comments on commit a3e5d19

Please sign in to comment.