Last change
on this file since eb226b2 was eb226b2, checked in by DenicaKj <dkorvezir@…>, 22 months ago |
Fixing errors
|
-
Property mode
set to
100644
|
File size:
691 bytes
|
Line | |
---|
1 | package com.example.moviezone.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Getter;
|
---|
5 | import lombok.Setter;
|
---|
6 | import lombok.ToString;
|
---|
7 | import org.springframework.security.core.GrantedAuthority;
|
---|
8 |
|
---|
9 | import java.util.Collection;
|
---|
10 | import java.util.Collections;
|
---|
11 |
|
---|
12 | @Entity
|
---|
13 | @Getter
|
---|
14 | @Setter
|
---|
15 | @ToString
|
---|
16 | @Table(name = "workers")
|
---|
17 | @PrimaryKeyJoinColumn(name = "id_worker")
|
---|
18 | public class Worker extends User {
|
---|
19 |
|
---|
20 | String position;
|
---|
21 |
|
---|
22 | String work_hours_from;
|
---|
23 | String work_hours_to;
|
---|
24 |
|
---|
25 | @ManyToOne
|
---|
26 | @JoinColumn(name = "id_cinema")
|
---|
27 | Cinema cinema;
|
---|
28 | @Override
|
---|
29 | public Collection<? extends GrantedAuthority> getAuthorities() {
|
---|
30 | return Collections.singletonList(Role.ROLE_ADMIN);
|
---|
31 | }
|
---|
32 |
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.