source: src/main/java/tech/techharbor/Model/UserTableModel.java@ f4b4afa

main
Last change on this file since f4b4afa 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: 2.0 KB
Line 
1package tech.techharbor.Model;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6import java.util.Objects;
7
8@Entity
9@Data
10@Table(name = "user_table", schema = "project", catalog = "db_202324z_va_prj_techharbor")
11public class UserTableModel {
12 @GeneratedValue(strategy = GenerationType.IDENTITY)
13 @Id
14 @Column(name = "user_id", nullable = false)
15 private Integer userId;
16 @Basic
17 @Column(name = "username", nullable = false, length = 100)
18 private String username;
19 @Basic
20 @Column(name = "name_user", nullable = false, length = 100)
21 private String nameUser;
22 @Basic
23 @Column(name = "email", nullable = false, length = 100)
24 private String email;
25 @Basic
26 @Column(name = "password", nullable = false, length = 100)
27 private String password;
28 @Basic
29 @Column(name = "phone_number", nullable = true, length = 100)
30 private String phoneNumber;
31 @Basic
32 @Column(name = "administrator_id", nullable = true)
33 private Integer administratorId;
34
35 public UserTableModel(String username, String nameUser, String email, String password, String phoneNumber) {
36 this.username = username;
37 this.nameUser = nameUser;
38 this.email = email;
39 this.password = password;
40 this.phoneNumber = phoneNumber;
41 }
42
43 public UserTableModel() {
44 }
45
46 @Override
47 public boolean equals(Object o) {
48 if (this == o) return true;
49 if (o == null || getClass() != o.getClass()) return false;
50 UserTableModel that = (UserTableModel) o;
51 return Objects.equals(userId, that.userId) && Objects.equals(username, that.username) && Objects.equals(nameUser, that.nameUser) && Objects.equals(email, that.email) && Objects.equals(password, that.password) && Objects.equals(phoneNumber, that.phoneNumber) && Objects.equals(administratorId, that.administratorId);
52 }
53
54 @Override
55 public int hashCode() {
56 return Objects.hash(userId, username, nameUser, email, password, phoneNumber, administratorId);
57 }
58}
Note: See TracBrowser for help on using the repository browser.