source: src/main/java/tech/techharbor/Model/OrderTableModel.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.4 KB
Line 
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 = "order_table", schema = "project", catalog = "db_202324z_va_prj_techharbor")
12public class OrderTableModel {
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Id
15 @Column(name = "order_id", nullable = false)
16 private Integer orderId;
17 @Basic
18 @Column(name = "order_status", nullable = false, length = 100)
19 private String orderStatus;
20 @Basic
21 @Column(name = "order_date", nullable = false)
22 private Date orderDate;
23 @Basic
24 @Column(name = "customer_id", nullable = false)
25 private Integer customerId;
26
27 public OrderTableModel(String orderStatus, Date orderDate, Integer customerId) {
28 this.orderStatus = orderStatus;
29 this.orderDate = orderDate;
30 this.customerId = customerId;
31 }
32
33 public OrderTableModel() {
34 }
35
36 @Override
37 public boolean equals(Object o) {
38 if (this == o) return true;
39 if (o == null || getClass() != o.getClass()) return false;
40 OrderTableModel that = (OrderTableModel) o;
41 return Objects.equals(orderId, that.orderId) && Objects.equals(orderStatus, that.orderStatus) && Objects.equals(orderDate, that.orderDate) && Objects.equals(customerId, that.customerId);
42 }
43
44 @Override
45 public int hashCode() {
46 return Objects.hash(orderId, orderStatus, orderDate, customerId);
47 }
48}
Note: See TracBrowser for help on using the repository browser.