Ignore:
Timestamp:
08/24/23 02:28:14 (16 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
bcb4acc
Parents:
40935d3
Message:

fix

Location:
src/main/java/com/example/moviezone/model
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/model/Discount.java

    r40935d3 r1e7126f  
    2929    String type;
    3030    Integer percent;
     31
     32    public Discount() {
     33    }
     34
     35    public Discount(LocalDate validity, String code, String type, Integer percent) {
     36        this.validity = validity;
     37        this.code = code;
     38        this.type = type;
     39        this.percent = percent;
     40    }
    3141}
  • src/main/java/com/example/moviezone/model/Projection.java

    r40935d3 r1e7126f  
    88
    99import java.time.LocalDate;
     10import java.time.LocalDateTime;
    1011
    1112@Getter
     
    2021    Integer id_projection;
    2122
    22     LocalDate date_time_start;
     23    LocalDateTime date_time_start;
    2324    String type_of_technology;
    24     LocalDate date_time_end;
     25    LocalDateTime date_time_end;
    2526    @ManyToOne
    2627    @JoinColumn(name = "id_film")
     
    3334    Discount discount;
    3435
    35     public Projection(LocalDate date_time_start, String type_of_technology, LocalDate date_time_end, Film film) {
     36    public Projection(LocalDateTime date_time_start, String type_of_technology, LocalDateTime date_time_end, Film film, Discount discount) {
    3637        this.date_time_start = date_time_start;
    3738        this.type_of_technology = type_of_technology;
    3839        this.date_time_end = date_time_end;
    3940        this.film = film;
     41        this.discount = discount;
    4042    }
    4143
  • src/main/java/com/example/moviezone/model/Role.java

    r40935d3 r1e7126f  
    66public enum Role implements GrantedAuthority {
    77
    8     ROLE_USER, ROLE_ADMIN;
     8    ROLE_USER, ROLE_ADMIN, ROLE_WORKER;
    99
    1010    @Override
  • src/main/java/com/example/moviezone/model/Worker.java

    r40935d3 r1e7126f  
    5959    @Override
    6060    public Collection<? extends GrantedAuthority> getAuthorities() {
    61         return Collections.singletonList(Role.ROLE_ADMIN);
     61        if (position.equalsIgnoreCase("admin"))
     62            return Collections.singletonList(Role.ROLE_ADMIN);
     63        else{
     64            return Collections.singletonList(Role.ROLE_WORKER);
     65        }
    6266    }
    6367
  • src/main/java/com/example/moviezone/model/enums/GenreEnum.java

    r40935d3 r1e7126f  
    1 package com.example.moviezone.model;public enum GenreEnum {
     1package com.example.moviezone.model.enums;
     2
     3public enum GenreEnum {
     4    Animation,
     5    Adventure,
     6    Comedy,
     7    Fantasy,
     8    Crime,
     9    Drama,
     10    Thriller
    211}
  • src/main/java/com/example/moviezone/model/manytomany/ProjectionIsPlayedInRoom.java

    r40935d3 r1e7126f  
    3030    Integer idroom;
    3131
    32 
     32    public ProjectionIsPlayedInRoom(Integer idprojection, Integer idroom) {
     33        this.idprojection = idprojection;
     34        this.idroom = idroom;
     35    }
    3336}
  • src/main/java/com/example/moviezone/model/procedures/TicketsCancelClass.java

    r40935d3 r1e7126f  
    1 package com.example.moviezone.model.procedures;public class TicketsCancelClass {
     1package com.example.moviezone.model.procedures;
     2
     3import com.example.moviezone.model.Ticket;
     4
     5public class TicketsCancelClass {
     6    public Ticket ticket;
     7    public boolean canCancel;
     8
     9    public TicketsCancelClass(Ticket ticket, boolean canCancel) {
     10        this.ticket = ticket;
     11        this.canCancel = canCancel;
     12    }
     13
     14    public TicketsCancelClass() {
     15    }
    216}
Note: See TracChangeset for help on using the changeset viewer.