Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Commit

Permalink
feat: Allow users to subscribe to newsletters
Browse files Browse the repository at this point in the history
  • Loading branch information
aelamrani committed Apr 7, 2020
1 parent 8a0f339 commit 48f77d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -137,6 +137,7 @@ public User update(User user) throws TechnicalException {
userMongo.setStatus(user.getStatus().name());
}
userMongo.setLastConnectionAt(user.getLastConnectionAt());
userMongo.setLoginCount(user.getLoginCount());

UserMongo userUpdated = internalUserRepo.save(userMongo);
return mapper.map(userUpdated, User.class);
Expand Down
Expand Up @@ -44,6 +44,7 @@ public class UserMongo extends Auditable {
private String sourceId;
private String status;
private Date lastConnectionAt;
private long loginCount;

public String getId() {
return id;
Expand Down Expand Up @@ -141,6 +142,14 @@ public void setLastConnectionAt(Date lastConnectionAt) {
this.lastConnectionAt = lastConnectionAt;
}

public long getLoginCount() {
return loginCount;
}

public void setLoginCount(long loginCount) {
this.loginCount = loginCount;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand Down

0 comments on commit 48f77d3

Please sign in to comment.