backend rewritten in rust #11
2 changed files with 5 additions and 0 deletions
|
@ -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