Skip to content

Commit

Permalink
fix(article): UpdateRequest 내용 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobhboy committed Apr 30, 2024
1 parent fa7ea97 commit f028424
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@
import com.sickgyun.server.article.domain.Article;
import com.sickgyun.server.user.domain.User;

public record ArticleUpdateRequest() {
import jakarta.validation.constraints.NotNull;

public record ArticleUpdateRequest(
@NotNull(message = "title은 필수 값입니다.")
String title,
@NotNull(message = "imgUrl은 필수 값입니다.")
String imgUrl,
@NotNull(message = "url은 필수 값입니다.")
String url
) {
public Article toEntity(User currentUser) {
return null;
return new Article(
title,
imgUrl,
url,
currentUser
);
}
}

0 comments on commit f028424

Please sign in to comment.