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:
811 bytes
|
Rev | Line | |
---|
[f4b4afa] | 1 | package tech.techharbor.Model;
|
---|
| 2 |
|
---|
| 3 | import jakarta.persistence.*;
|
---|
| 4 | import lombok.Data;
|
---|
| 5 |
|
---|
| 6 | import java.util.Objects;
|
---|
| 7 |
|
---|
| 8 | @Entity
|
---|
| 9 | @Data
|
---|
| 10 | @Table(name = "delivery_man", schema = "project", catalog = "db_202324z_va_prj_techharbor")
|
---|
| 11 | public class DeliveryManModel {
|
---|
| 12 | @Id
|
---|
| 13 | @Column(name = "user_id", nullable = false)
|
---|
| 14 | private Integer userId;
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 | public DeliveryManModel(Integer userId) {
|
---|
| 18 | this.userId = userId;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public DeliveryManModel() {
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | @Override
|
---|
| 25 | public boolean equals(Object o) {
|
---|
| 26 | if (this == o) return true;
|
---|
| 27 | if (o == null || getClass() != o.getClass()) return false;
|
---|
| 28 | DeliveryManModel that = (DeliveryManModel) o;
|
---|
| 29 | return Objects.equals(userId, that.userId);
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | @Override
|
---|
| 33 | public int hashCode() {
|
---|
| 34 | return Objects.hash(userId);
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.