source: src/main/java/tech/techharbor/Model/VehicleModel.java

main
Last change on this file was f4b4afa, checked in by Nikola Todoroski <nikola.todoroski@…>, 6 months ago

Pushed whole project, original project location on github:https://github.com/hehxd/Tech-Harbor

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[f4b4afa]1package tech.techharbor.Model;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6import java.sql.Date;
7import java.util.Objects;
8
9@Entity
10@Data
11@Table(name = "vehicle", schema = "project", catalog = "db_202324z_va_prj_techharbor")
12public class VehicleModel {
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Id
15 @Column(name = "vehicle_id", nullable = false)
16 private Integer vehicleId;
17 @Basic
18 @Column(name = "vehicle_model", length = 100)
19 private String vehicleModel;
20 @Basic
21 @Column(name = "vehicle_service")
22 private Date vehicleService;
23 @Basic
24 @Column(name = "delivery_man_id", nullable = false)
25 private Integer deliveryManId;
26
27 @Override
28 public boolean equals(Object o) {
29 if (this == o) return true;
30 if (o == null || getClass() != o.getClass()) return false;
31 VehicleModel that = (VehicleModel) o;
32 return Objects.equals(vehicleId, that.vehicleId) && Objects.equals(vehicleModel, that.vehicleModel) && Objects.equals(vehicleService, that.vehicleService) && Objects.equals(deliveryManId, that.deliveryManId);
33 }
34
35 @Override
36 public int hashCode() {
37 return Objects.hash(vehicleId, vehicleModel, vehicleService, deliveryManId);
38 }
39}
Note: See TracBrowser for help on using the repository browser.