70. User service (#8 Section 10: User Service)
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
package net.shyshkin.study.fullstack.supportportal.backend.domain.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class UserDto {
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String username;
|
||||
private String email;
|
||||
private String role;
|
||||
private boolean isNonLocked;
|
||||
private boolean isActive;
|
||||
private MultipartFile profileImage;
|
||||
}
|
||||
@ -1,7 +1,9 @@
|
||||
package net.shyshkin.study.fullstack.supportportal.backend.service;
|
||||
|
||||
import net.shyshkin.study.fullstack.supportportal.backend.domain.User;
|
||||
import net.shyshkin.study.fullstack.supportportal.backend.domain.dto.UserDto;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -15,4 +17,14 @@ public interface UserService extends UserDetailsService {
|
||||
|
||||
User findByEmail(String email);
|
||||
|
||||
User addNewUser(UserDto userDto);
|
||||
|
||||
User updateUser(String username, UserDto userDto);
|
||||
|
||||
void deleteUser(long id);
|
||||
|
||||
void resetPassword(String email);
|
||||
|
||||
User updateProfileImage(String username, MultipartFile profileImage);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user