source: src/main/java/com/example/salonbella/entity/UserEntity.java@ 74af394

Last change on this file since 74af394 was 74af394, checked in by makyjovanovsky <mjovanovski04@…>, 17 months ago

login/register with mail confirmation

  • Property mode set to 100644
File size: 2.2 KB
Line 
1package com.example.salonbella.entity;
2
3import javax.persistence.*;
4import java.util.Set;
5
6@Entity
7@Table(name = "users")
8public class UserEntity {
9 @Id
10 @GeneratedValue(strategy = GenerationType.IDENTITY)
11 private Long id;
12
13 @Column(name = "first_name", nullable = false, length = 30)
14 private String name;
15
16 @Column(name = "last_name", nullable = false, length = 30)
17 private String surname;
18
19 @Column(name = "phone_number",nullable = false, length = 30)
20 private String number;
21
22 @Column(name = "email", nullable = false, unique = true, length = 30)
23 private String email;
24
25 @Column(name = "username", nullable = false, unique = true, length = 30)
26 private String username;
27
28 @Column(name = "password", nullable = false, length = 100)
29 private String password;
30
31 @Column(name = "role", nullable = false, length = 10)
32 private String role = "USER";
33
34 @Column(name = "valid",nullable = false)
35 private boolean valid = false;
36
37
38
39 public UserEntity() {
40 }
41
42 public Long getId() {
43 return id;
44 }
45
46 public String getRole() {
47 return role;
48 }
49
50 public void setId(Long id) {
51 this.id = id;
52 }
53
54 public boolean isValid() {
55 return valid;
56 }
57
58 public void setValid(boolean valid) {
59 this.valid = valid;
60 }
61
62 public String getName() {
63 return name;
64 }
65
66 public void setName(String name) {
67 this.name = name;
68 }
69
70 public String getSurname() {
71 return surname;
72 }
73
74 public void setSurname(String surname) {
75 this.surname = surname;
76 }
77
78 public String getUsername() {
79 return username;
80 }
81
82 public void setUsername(String username) {
83 this.username = username;
84 }
85
86 public String getPassword() {
87 return password;
88 }
89
90 public void setPassword(String password) {
91 this.password = password;
92 }
93
94 public void setRole(String role) {
95 this.role = role;
96 }
97
98 public String getEmail() {
99 return email;
100 }
101
102 public void setEmail(String email) {
103 this.email = email;
104 }
105
106 public String getNumber() {
107 return number;
108 }
109
110 public void setNumber(String number) {
111 this.number = number;
112 }
113}
Note: See TracBrowser for help on using the repository browser.