Skip to content

Commit

Permalink
Merge pull request #143 from TEAM-YOAJUNG/hotfix/contact-info-import
Browse files Browse the repository at this point in the history
[HOT-FIX] 누락된 파일 추가
  • Loading branch information
EeeasyCode authored Nov 19, 2024
2 parents 4cd3fa0 + 525e1a2 commit f94e19f
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package club.gach_dong.dto.response;

import club.gach_dong.domain.ContactInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

public record ContactInfoResponse(
@Schema(description = "연락처 ID", example = "1")
@NotNull
Long id,

@Schema(description = "연락 수단 (예: gmail, phone)", example = "gmail")
@NotNull
String contactMethod,

@Schema(description = "연락처 정보", example = "gachdong@gmail.com")
@NotNull
String contactValue
) {
public static ContactInfoResponse from(ContactInfo contactInfo) {
return new ContactInfoResponse(
contactInfo.getId(),
contactInfo.getContactMethod(),
contactInfo.getContactValue()
);
}
}

0 comments on commit f94e19f

Please sign in to comment.