source: src/main/java/com/example/moviezone/model/Customer.java@ ac25203

Last change on this file since ac25203 was ac25203, checked in by DenicaKj <dkorvezir@…>, 22 months ago

Spring Security

  • Property mode set to 100644
File size: 659 bytes
Line 
1package com.example.moviezone.model;
2
3import jakarta.persistence.Entity;
4import jakarta.persistence.PrimaryKeyJoinColumn;
5import jakarta.persistence.Table;
6import lombok.Getter;
7import lombok.Setter;
8import lombok.ToString;
9import org.springframework.security.core.GrantedAuthority;
10
11import java.util.Collection;
12import java.util.Collections;
13
14@Entity
15@Getter
16@Setter
17@ToString
18@Table(name = "customers")
19@PrimaryKeyJoinColumn(name = "id_customer")
20public class Customer extends User{
21
22
23 Integer points;
24
25 @Override
26 public Collection<? extends GrantedAuthority> getAuthorities() {
27 return Collections.singletonList(Role.ROLE_ADMIN);
28 }
29
30}
Note: See TracBrowser for help on using the repository browser.