-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#23 - User class 추가 - GithubAccessToken class 추가
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
BE/src/main/java/kr/codesquad/airbnb12/domain/GithubAccessToken.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,35 @@ | ||
package kr.codesquad.airbnb12.domain; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class GithubAccessToken { | ||
|
||
@JsonProperty("access_token") | ||
private String accessToken; | ||
|
||
@JsonProperty("token_type") | ||
private String tokenType; | ||
|
||
public GithubAccessToken() { } | ||
|
||
public GithubAccessToken(String accessToken, String tokenType) { | ||
this.accessToken = accessToken; | ||
this.tokenType = tokenType; | ||
} | ||
|
||
public String getAccessToken() { | ||
return accessToken; | ||
} | ||
|
||
public void setAccessToken(String accessToken) { | ||
this.accessToken = accessToken; | ||
} | ||
|
||
public String getTokenType() { | ||
return tokenType; | ||
} | ||
|
||
public void setTokenType(String tokenType) { | ||
this.tokenType = tokenType; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,35 @@ | ||
package kr.codesquad.airbnb12.domain; | ||
|
||
public class User { | ||
|
||
private Long id; | ||
|
||
private String email; | ||
|
||
public User() {} | ||
|
||
public User(Long id, String email) { | ||
this.id = id; | ||
this.email = email; | ||
} | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getEmail() { | ||
return email; | ||
} | ||
|
||
public void setEmail(String email) { | ||
this.email = email; | ||
} | ||
|
||
public static User create(Long id, String email) { | ||
return new User(id, email); | ||
} | ||
} |