-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
BE/src/main/java/com/codesquad/issuetracker/hamill/dto/request/NewLabelDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package com.codesquad.issuetracker.hamill.dto.request; | ||
|
||
public class NewLabelDto { | ||
|
||
private String title; | ||
|
||
private String description; | ||
|
||
private String backgroundColor; | ||
|
||
private String color; | ||
|
||
private NewLabelDto(String title, String description, String backgroundColor, String color) { | ||
this.title = title; | ||
this.description = description; | ||
this.backgroundColor = backgroundColor; | ||
this.color = color; | ||
} | ||
|
||
public static NewLabelDto of(String title, String description, String backgroundColor, String color) { | ||
return new Builder() | ||
.title(title) | ||
.description(description) | ||
.backgroundColor(backgroundColor) | ||
.color(color) | ||
.build(); | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public String getBackgroundColor() { | ||
return backgroundColor; | ||
} | ||
|
||
public String getColor() { | ||
return color; | ||
} | ||
|
||
private static class Builder { | ||
private String title; | ||
private String description; | ||
private String backgroundColor; | ||
private String color; | ||
|
||
private Builder title(String title) { | ||
this.title = title; | ||
return this; | ||
} | ||
|
||
private Builder description(String description) { | ||
this.description = description; | ||
return this; | ||
} | ||
|
||
private Builder backgroundColor(String backgroundColor) { | ||
this.backgroundColor = backgroundColor; | ||
return this; | ||
} | ||
|
||
private Builder color(String color) { | ||
this.color = color; | ||
return this; | ||
} | ||
|
||
private NewLabelDto build() { | ||
return new NewLabelDto(title, description, backgroundColor, color); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters