source: src/main/java/com/example/moviezone/model/Worker.java@ eb226b2

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