source: src/main/java/tech/techharbor/Model/DeliveryModel.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.7 KB
RevLine 
[f4b4afa]1package tech.techharbor.Model;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6import java.util.Objects;
7
8@Entity
9@Data
10@Table(name = "delivery", schema = "project", catalog = "db_202324z_va_prj_techharbor")
11public class DeliveryModel {
12 @GeneratedValue(strategy = GenerationType.IDENTITY)
13 @Id
14 @Column(name = "delivery_id", nullable = false)
15 private Integer deliveryId;
16 @Basic
17 @Column(name = "delivery_status", nullable = false, length = 100)
18 private String deliveryStatus;
19 @Basic
20 @Column(name = "delivery_address", nullable = false, length = 100)
21 private String deliveryAddress;
22 @Basic
23 @Column(name = "delivery_man_id", nullable = false)
24 private Integer deliveryManId;
25 @Basic
26 @Column(name = "order_id", nullable = false)
27 private Integer orderId;
28
29 public DeliveryModel(String deliveryStatus, String deliveryAddress, Integer deliveryManId, Integer orderId) {
30 this.deliveryStatus = deliveryStatus;
31 this.deliveryAddress = deliveryAddress;
32 this.deliveryManId = deliveryManId;
33 this.orderId = orderId;
34 }
35
36 public DeliveryModel() {
37 }
38
39 @Override
40 public boolean equals(Object o) {
41 if (this == o) return true;
42 if (o == null || getClass() != o.getClass()) return false;
43 DeliveryModel that = (DeliveryModel) o;
44 return Objects.equals(deliveryId, that.deliveryId) && Objects.equals(deliveryStatus, that.deliveryStatus) && Objects.equals(deliveryAddress, that.deliveryAddress) && Objects.equals(deliveryManId, that.deliveryManId) && Objects.equals(orderId, that.orderId);
45 }
46
47 @Override
48 public int hashCode() {
49 return Objects.hash(deliveryId, deliveryStatus, deliveryAddress, deliveryManId, orderId);
50 }
51}
Note: See TracBrowser for help on using the repository browser.