Skip to content

Commit

Permalink
[FEAT] 검색 Response DTO #24
Browse files Browse the repository at this point in the history
  • Loading branch information
dl-00-e8 committed Feb 9, 2023
1 parent 23a5969 commit 64da600
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
package com.mews.mews_backend.api.search.dto.response;

import com.mews.mews_backend.domain.article.entity.Article;
import lombok.Getter;

@Getter
public class PostArticleRes {

private Integer id;

private String title;

public PostArticleRes(Article article) {
this.id = article.getArticle_id();
this.title = article.getTitle();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
package com.mews.mews_backend.api.search.dto.response;

import com.mews.mews_backend.domain.editor.entity.Editor;
import lombok.Getter;

@Getter
public class PostEditorRes {

private Integer id;

private String name;

private String imgUrl;

//Entity to DTO
public PostEditorRes(Editor editor) {
this.id = editor.getId();
this.name = editor.getName();
this.imgUrl = editor.getImgUrl();
}
}

0 comments on commit 64da600

Please sign in to comment.