Skip to content
Snippets Groups Projects
Commit 90d3e92a authored by Zink Hannah's avatar Zink Hannah
Browse files

User Modul und Repo

parent 53f8417e
No related branches found
No related tags found
3 merge requests!11update branch,!7update branch to get access to user auth,!5#6 #8 Authentifizierungsprozess
package hdm.mi.growbros.models.user;
import jakarta.persistence.*;
import lombok.Data;
@Entity
@Data
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@Column(unique = true)
private String email;
private String password;
}
package hdm.mi.growbros.repositories;
import hdm.mi.growbros.models.user.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Optional;
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
//User anhand seiner Mail finden
Optional<User> findByEmail(String email);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment