Skip to content

Commit

Permalink
Merge pull request #67 from MoCo-v2/feat/MOCO-92
Browse files Browse the repository at this point in the history
feat : pageLink 컬럼 추가
  • Loading branch information
wlswo authored Feb 14, 2024
2 parents 80482c3 + 1c1993e commit 6b4f801
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/moco/moco/domain/Banner.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,23 @@ public class Banner extends Time {
@Column(name = "imageLink")
private String imageLink;

@Column(name = "pageLink")
private String pageLink;

@Column(name = "expose")
private boolean expose = false;

@Builder
public Banner(int ordering, String memo, String title, String content, String description, String backgroundColor,
String imageLink, boolean expose) {
String imageLink, String pageLink, boolean expose) {
this.ordering = ordering;
this.memo = memo;
this.title = title;
this.content = content;
this.description = description;
this.backgroundColor = backgroundColor;
this.imageLink = imageLink;
this.pageLink = pageLink;
this.expose = expose;
}

Expand All @@ -69,6 +73,7 @@ public Banner update(BannerDto.Request request) {
this.description = request.getDescription();
this.backgroundColor = request.getBackgroundColor();
this.imageLink = request.getImageLink();
this.pageLink = request.getPageLink();
this.expose = request.isExpose();
return this;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/moco/moco/dto/BannerDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static class Request {
private String description;
private String backgroundColor;
private String imageLink;
private String pageLink;
private boolean expose;

public Banner toEntity() {
Expand All @@ -32,6 +33,7 @@ public Banner toEntity() {
.description(description)
.backgroundColor(backgroundColor)
.imageLink(imageLink)
.pageLink(pageLink)
.expose(expose)
.build();
}
Expand All @@ -48,6 +50,7 @@ public static class Response {
private String description;
private String backgroundColor;
private String imageLink;
private String pageLink;
private boolean expose;

@Builder
Expand All @@ -60,6 +63,7 @@ public Response(Banner banner) {
this.description = banner.getDescription();
this.backgroundColor = banner.getBackgroundColor();
this.imageLink = banner.getImageLink();
this.pageLink = banner.getPageLink();
this.expose = banner.isExpose();
}
}
Expand Down

0 comments on commit 6b4f801

Please sign in to comment.