source: src/main/java/com/example/autopartz/model/Warehouse.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: 739 bytes
Line 
1package com.example.autopartz.model;
2
3import jakarta.persistence.Entity;
4import jakarta.persistence.Id;
5import lombok.*;
6import org.hibernate.Hibernate;
7
8import java.util.Objects;
9
10@Getter
11@Setter
12@ToString
13@RequiredArgsConstructor
14@Entity
15public class Warehouse {
16 @Id
17 Long ID_warehouse;
18 String warehouse_location;
19
20 @Override
21 public boolean equals(Object o) {
22 if (this == o) return true;
23 if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
24 Warehouse warehouse = (Warehouse) o;
25 return ID_warehouse != null && Objects.equals(ID_warehouse, warehouse.ID_warehouse);
26 }
27
28 @Override
29 public int hashCode() {
30 return getClass().hashCode();
31 }
32}
Note: See TracBrowser for help on using the repository browser.