Ignore:
Timestamp:
01/05/23 04:11:40 (23 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
1bd8d1e
Parents:
7d43957
Message:

Added admin view of pending roles and approve functionality

Location:
src/main/java/com/example/autopartz/model
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/autopartz/model/Administrator.java

    r7d43957 r676144b  
    2727        if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
    2828        Administrator that = (Administrator) o;
    29         return ID_user != null && Objects.equals(ID_user, that.ID_user);
     29        return id != null && Objects.equals(id, that.id);
    3030    }
    3131
  • src/main/java/com/example/autopartz/model/Client.java

    r7d43957 r676144b  
    2828        if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
    2929        Client client = (Client) o;
    30         return ID_user != null && Objects.equals(ID_user, client.ID_user);
     30        return id != null && Objects.equals(id, client.id);
    3131    }
    3232
  • src/main/java/com/example/autopartz/model/Deliveryman.java

    r7d43957 r676144b  
    3535        if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
    3636        Deliveryman that = (Deliveryman) o;
    37         return ID_user != null && Objects.equals(ID_user, that.ID_user);
     37        return id != null && Objects.equals(id, that.id);
    3838    }
    3939
  • src/main/java/com/example/autopartz/model/User.java

    r7d43957 r676144b  
    2525    @Id
    2626    @GeneratedValue(strategy = GenerationType.IDENTITY)
    27     Integer ID_user;
     27    @Column(name = "ID_user")
     28    Integer id;
    2829    String username;
    2930    String email;
    30     String name_user;
     31    @Column(name = "name_user")
     32    String name;
    3133    @Column(name = "password_user")
    3234    String password;
     
    3941    public User(String username, String name, String email, String password, String number) {
    4042        this.username = username;
    41         this.name_user = name;
     43        this.name = name;
    4244        this.email = email;
    4345        this.password = password;
     
    5153        if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
    5254        User user = (User) o;
    53         return ID_user != null && Objects.equals(ID_user, user.ID_user);
     55        return id != null && Objects.equals(id, user.id);
    5456    }
    5557
  • src/main/java/com/example/autopartz/model/Warehouseman.java

    r7d43957 r676144b  
    3939        if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
    4040        Warehouseman that = (Warehouseman) o;
    41         return ID_user != null && Objects.equals(ID_user, that.ID_user);
     41        return id != null && Objects.equals(id, that.id);
    4242    }
    4343
     
    4848    @Override
    4949    public Collection<? extends GrantedAuthority> getAuthorities() {
    50         if(employed_from==defaultEmployedFrom)
     50        if(Objects.equals(employed_from, defaultEmployedFrom))
    5151            return Collections.singletonList(Role.ROLE_PENDING_WAREHOUSEMAN);
    5252        else
  • src/main/java/com/example/autopartz/model/views/ReviewsForUser.java

    r7d43957 r676144b  
    2828    Integer userid;
    2929    Integer rating;
     30    Integer orderid;
    3031    String rcomment;
    3132    String rsname;
Note: See TracChangeset for help on using the changeset viewer.