Skip to content
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

Merged
merged 8 commits into from
Sep 20, 2023
Merged

사용자 entity 추가 #34

merged 8 commits into from
Sep 20, 2023

Conversation

knh0113
Copy link
Collaborator

@knh0113 knh0113 commented Sep 19, 2023

No description provided.

Copy link
Collaborator Author

@knh0113 knh0113 left a 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;
Copy link
Collaborator Author

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;
Copy link
Collaborator Author

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;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CalmelCase 적용해주세요

Comment on lines 61 to 65
@Column(nullable = false)
private String access_token;

@Column(nullable = false)
private String refresh_token;
Copy link
Collaborator Author

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;
Copy link
Collaborator Author

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;
Copy link
Collaborator Author

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;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum으로의 변경 필요

Comment on lines 23 to 30
@Column(nullable = false)
private String access_token;

@Column(nullable = false)
private String refresh_token;

@Column(nullable = false)
private LocalDateTime created_at;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Column Naming Camelcase 방식으로만 바꿔주세요.

Copy link
Owner

@donsonioc2010 donsonioc2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인만 부탁드릴게요~

Comment on lines +19 to +21
@Id
@GeneratedValue(strategy = IDENTITY)
private Long id;
Copy link
Owner

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 {
Copy link
Owner

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 {
Copy link
Owner

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 {
Copy link
Owner

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;
Copy link
Owner

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;
//
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에 member.repository의 경로로 MemberRepository의 존재가 있기 떄문에 삭제하셔도 될 것 같습니다.

Comment on lines 8 to 30
<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>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 login 페이지를 따로 제작하셔야 할것 같아요 해당 페이지는 메인페이지이기 떄문에 해당 디자인이 아니었던것 같습니다.

@bongsh0112 bongsh0112 merged commit 0153091 into dev Sep 20, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants