source: src/main/java/com/example/autopartz/model/Administrator.java@ 2e46f06

main
Last change on this file since 2e46f06 was 2e46f06, checked in by andrejtodorovski <82031894+andrejtodorovski@…>, 19 months ago

Adding the models and testing one view

  • Property mode set to 100644
File size: 706 bytes
Line 
1package com.example.autopartz.model;
2
3import jakarta.persistence.*;
4import lombok.*;
5import org.hibernate.Hibernate;
6
7import java.time.LocalDate;
8import java.util.Objects;
9
10@Getter
11@Setter
12@ToString
13@Entity
14public class Administrator extends User{
15 LocalDate authorized_from;
16 LocalDate authorized_till;
17
18
19 @Override
20 public boolean equals(Object o) {
21 if (this == o) return true;
22 if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
23 Administrator that = (Administrator) o;
24 return ID_user != null && Objects.equals(ID_user, that.ID_user);
25 }
26
27 @Override
28 public int hashCode() {
29 return getClass().hashCode();
30 }
31}
Note: See TracBrowser for help on using the repository browser.