-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
사용자 entity 추가 #34
사용자 entity 추가 #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
private String login_type; | ||
|
||
@Column(nullable = false) | ||
private String status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enum으로 변경해주셔야합니다.
private Date created_at; | ||
|
||
@Column(nullable = false) | ||
private Date updated_at; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date 사용한 Field는 LocalDatetime으로 변경해주셔야합니다.
private String role; | ||
|
||
@Column(nullable = false) | ||
private Date created_at; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CalmelCase 적용해주세요
@Column(nullable = false) | ||
private String access_token; | ||
|
||
@Column(nullable = false) | ||
private String refresh_token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
token은 Entity는 따로 뽑으셔야합니다
private Long point; | ||
|
||
@Column(nullable = false) | ||
private String login_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum으로의 변경 필요
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
private Long id; | ||
private Long user_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
불필요 컬럼
private String status; | ||
|
||
@Column(nullable = false) | ||
private String role; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enum으로의 변경 필요
@Column(nullable = false) | ||
private String access_token; | ||
|
||
@Column(nullable = false) | ||
private String refresh_token; | ||
|
||
@Column(nullable = false) | ||
private LocalDateTime created_at; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Column
Naming Camelcase 방식으로만 바꿔주세요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인만 부탁드릴게요~
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
private Long id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Member Entity와 @ManyToOne
관계를 가져야합니다.
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class Member { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Member에서도 Token에 대한 관계가 있어야 할것 같아요.
@@ -0,0 +1,5 @@ | |||
package picasso.server.domain.domains.member.type; | |||
|
|||
public enum Status { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 Stuatus라는 명칭으로 나올 수 있는 Enum의 존재가 매우 많습니다.
명확하게 UserStatus 라는 명칭으로 바꾸는게 좋을 것 같아요.
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
|
||
public class TestSample { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당클래스는 제가 Enum을 보여드리고자 생성했던 Class기 떄문에 필요가 없을 것 같습니다
@@ -0,0 +1,67 @@ | |||
//package picasso.server.domain.domains.repository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 클래스는 불필요해 보이는 클래스여서 삭제해주면 좋을것같아요.
//package picasso.server.domain.domains.repository; | ||
// | ||
//import org.springframework.data.jpa.repository.JpaRepository; | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위에 member.repository의 경로로 MemberRepository의 존재가 있기 떄문에 삭제하셔도 될 것 같습니다.
<body> | ||
<div class="login-container"> | ||
<h2>로그인</h2> | ||
<form th:action="@{/login}" method="post"> | ||
<div class="form-group"> | ||
<label for="username">사용자 이름:</label> | ||
<input type="text" id="username" name="username" required/> | ||
</div> | ||
<div class="form-group"> | ||
<label for="password">비밀번호:</label> | ||
<input type="password" id="password" name="password" required/> | ||
</div> | ||
<div class="form-group"> | ||
<button type="submit">로그인</button> | ||
</div> | ||
</form> | ||
</div> | ||
<script> | ||
// 필요한 경우 자바스크립트를 추가하실 수 있습니다. | ||
console.log('로그인 페이지 로딩 완료'); | ||
</script> | ||
</body> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 login 페이지를 따로 제작하셔야 할것 같아요 해당 페이지는 메인페이지이기 떄문에 해당 디자인이 아니었던것 같습니다.
No description provided.