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 | |
---|
1 | package com.example.moviezone.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.Entity;
|
---|
4 | import jakarta.persistence.PrimaryKeyJoinColumn;
|
---|
5 | import jakarta.persistence.Table;
|
---|
6 | import lombok.Getter;
|
---|
7 | import lombok.Setter;
|
---|
8 | import lombok.ToString;
|
---|
9 | import org.springframework.security.core.GrantedAuthority;
|
---|
10 |
|
---|
11 | import java.util.Collection;
|
---|
12 | import java.util.Collections;
|
---|
13 |
|
---|
14 | @Entity
|
---|
15 | @Getter
|
---|
16 | @Setter
|
---|
17 | @ToString
|
---|
18 | @Table(name = "customers")
|
---|
19 | @PrimaryKeyJoinColumn(name = "id_customer")
|
---|
20 | public 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.