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:
792 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 = "customer", schema = "project", catalog = "db_202324z_va_prj_techharbor")
|
---|
| 11 | public class CustomerModel {
|
---|
| 12 |
|
---|
| 13 | @Id
|
---|
| 14 | @Column(name = "user_id", nullable = false)
|
---|
| 15 | private Integer userId;
|
---|
| 16 |
|
---|
| 17 | public CustomerModel(Integer userId) {
|
---|
| 18 | this.userId = userId;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public CustomerModel() {
|
---|
| 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 | CustomerModel that = (CustomerModel) 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.