Last active
August 29, 2015 14:21
-
-
Save ParkMinKyu/a17374a4c784aaeaa24d to your computer and use it in GitHub Desktop.
Domain에 필요한 Request와 Response를 Inner Class로 넣어준다.
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
/** | |
Domain에 필요한 Request와 Response를 Inner Class로 넣어준다. | |
이는 DTO를 따로 만들지 않고 Domain을 이용하기 위함이다. | |
*/ | |
@Entity | |
@Data | |
public class User extends AbstractPersistable<Integer> { | |
private String username; | |
private String password; | |
private String firstName; | |
private String lastName; | |
@Temporal(TemporalType.TIMESTAMP) | |
private Date joinDate = new Date(); | |
@data | |
public static class Request{ | |
//입력시 필요한 요청값 셋팅 | |
private String username; | |
private String password; | |
private String firstName; | |
private String lastName; | |
private Date joinDate = new Date(); | |
} | |
@data | |
public static Response{ | |
//응답시 필요한 값 | |
private String username; | |
private String firstName; | |
private String lastName; | |
private Date joinDate = new Date(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment