mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
659ab79497
- /src/main/resources/templates/create-account.html - /src/main/resources/templates/my-profile.html - /src/main/resources/templates/home.html - /src/main/resources/templates/update-recipe.html - /src/main/resources/templates/explore.html - /src/main/resources/templates/public-profile.html - /src/main/java/com/example/demo/controller/SiteController.java - /src/main/java/com/example/demo/controller/ProfileController.java - /src/main/java/com/example/demo/dto/UserDto.java - /src/main/java/com/example/demo/dto/UpdateProfileDto.java - /src/main/java/com/example/demo/dto/ProfileDto.java - /src/main/java/com/example/demo/service/Impl/RecipeServiceImpl.java - /src/main/java/com/example/demo/service/Impl/UserServiceImpl.java - /src/main/java/com/example/demo/service/UserService.java - /src/main/java/com/example/demo/config/SecurityConfig.java - /src/main/java/com/example/demo/entity/User.java
73 lines
1.2 KiB
Java
73 lines
1.2 KiB
Java
package com.example.demo.dto;
|
|
|
|
public class UserDto {
|
|
private Integer id;
|
|
private String username;
|
|
private String email;
|
|
private String displayName;
|
|
private String bio;
|
|
|
|
public UserDto() {
|
|
}
|
|
|
|
public UserDto(Integer id, String username, String email) {
|
|
this.id = id;
|
|
this.username = username;
|
|
this.email = email;
|
|
}
|
|
|
|
public UserDto(Integer id, String username, String email, String displayName, String bio) {
|
|
this.id = id;
|
|
this.username = username;
|
|
this.email = email;
|
|
this.displayName = displayName;
|
|
this.bio = bio;
|
|
}
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getUsername() {
|
|
return username;
|
|
}
|
|
|
|
public void setUsername(String username) {
|
|
this.username = username;
|
|
}
|
|
|
|
public String getEmail() {
|
|
return email;
|
|
}
|
|
|
|
public void setEmail(String email) {
|
|
this.email = email;
|
|
}
|
|
|
|
public String getDisplayName() {
|
|
return displayName;
|
|
}
|
|
|
|
public void setDisplayName(String displayName) {
|
|
this.displayName = displayName;
|
|
}
|
|
|
|
public String getBio() {
|
|
return bio;
|
|
}
|
|
|
|
public void setBio(String bio) {
|
|
this.bio = bio;
|
|
}
|
|
|
|
public String getEffectiveDisplayName() {
|
|
if (displayName != null && !displayName.isBlank()) {
|
|
return displayName;
|
|
}
|
|
return username;
|
|
}
|
|
} |