add Todo and add findByEmail for later use in UserRepository.java
This commit is contained in:
parent
e15761eb39
commit
b2c1e2e744
|
@ -42,6 +42,7 @@ public class User implements UserDetails {
|
|||
@Column(name = "updated_at", nullable = false)
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
// TODO: I think this can be removed since the same logic is already done by @CreationTimestamp annotation
|
||||
@PrePersist
|
||||
protected void onCreate() {
|
||||
createdAt = LocalDateTime.now();
|
||||
|
|
|
@ -2,7 +2,11 @@ package com.mixel.docusphere.repository;
|
|||
|
||||
import com.mixel.docusphere.entity.User;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface UserRepository extends JpaRepository<User, UUID> {
|
||||
|
||||
Optional<User> findByEmail(String email);
|
||||
}
|
Loading…
Reference in a new issue