package project.educatum.model; import lombok.Data; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import java.util.Collection; @Data @Entity @Table(name = "admini", schema = "project") public class Admin implements UserDetails { @Id @Column(name = "id_admin", nullable = false) private Integer id; @Column(name = "ime", nullable = false, length = 50) private String name; @Column(name = "prezime", nullable = false, length = 50) private String surname; @Column(name = "email", nullable = false, length = 50) private String email; @Column(name = "password", nullable = false, length = 30) private String password; @Override public Collection getAuthorities() { return null; } @Override public String getUsername() { return email; } @Override public boolean isAccountNonExpired() { return false; } @Override public boolean isAccountNonLocked() { return false; } @Override public boolean isCredentialsNonExpired() { return false; } @Override public boolean isEnabled() { return true; } }