Skip to content

Commit

Permalink
feat: #27 Member - 휴면 회원은 로그인 시간 갱신 대상에서 제외
Browse files Browse the repository at this point in the history
  • Loading branch information
woody35545 committed May 9, 2024
1 parent 2ac84fe commit 92d6054
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import java.time.LocalDateTime;

@Getter
@Entity@Table(name = "members")
@Entity
@Table(name = "members")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Member {
@Id
Expand All @@ -37,6 +38,7 @@ public class Member {
private String status;
@Column(name = "member_role")
private String role;

@Builder
public Member(Long id, Integer gradeId, String name, String phone, String email,
LocalDate birthdate, LocalDateTime latestLogin, Integer point,
Expand All @@ -55,9 +57,12 @@ public Member(Long id, Integer gradeId, String name, String phone, String email,

/**
* 마지막 로그인 시간을 갱신한다.
*
* @author woody35545(구건모)
*/
public void updateLastLogin() {
this.latestLogin = LocalDateTime.now();
if (!this.status.equals("INACTIVE")) {
this.latestLogin = LocalDateTime.now();
}
}
}

0 comments on commit 92d6054

Please sign in to comment.