Subversion Repositories SmartDukaan

Rev

Rev 24383 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
24330 amit.gupta 1
package com.spice.profitmandi.dao.entity.auth;
2
 
3
import java.time.LocalDateTime;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Id;
8
import javax.persistence.Table;
9
 
10
@Entity
11
@Table(name = "auth.auth_user", schema = "auth")
12
public class AuthUser {
13
 
14
	@Id
15
	@Column(name = "email_id", unique=true, updatable=false)
16
	private String emailId;
17
 
18
	@Column(name="first_name", nullable=false)
19
	private String firstName;
20
 
21
	@Column(name="last_name")
22
	private String lastName;
23
 
24
	public String getFirstName() {
25
		return firstName;
26
	}
27
 
28
 
29
 
30
	public void setFirstName(String firstName) {
31
		this.firstName = firstName;
32
	}
33
 
34
 
35
 
36
	public String getLastName() {
37
		return lastName;
38
	}
39
 
40
 
41
 
42
	public void setLastName(String lastName) {
43
		this.lastName = lastName;
44
	}
45
 
46
 
47
 
48
	public String getPassword() {
49
		return password;
50
	}
51
 
52
 
53
 
54
	public void setPassword(String password) {
55
		this.password = password;
56
	}
57
 
58
 
59
 
60
	@Column(name = "mobile_number", unique=true)
61
	private String mobileNumber;
62
 
63
	@Column(name = "password")
64
	private String password;
65
 
66
	@Column(name = "created_timestamp")
67
	private LocalDateTime createdTimestamp;
68
 
69
	@Column(name = "last_login_timestap", unique=true, updatable=true)
70
	private LocalDateTime lastLoginTimestamp;
71
 
72
 
73
 
74
	@Override
75
	public int hashCode() {
76
		final int prime = 31;
77
		int result = 1;
78
		result = prime * result + ((emailId == null) ? 0 : emailId.hashCode());
79
		return result;
80
	}
81
 
82
 
83
 
84
	@Override
85
	public boolean equals(Object obj) {
86
		if (this == obj)
87
			return true;
88
		if (obj == null)
89
			return false;
90
		if (getClass() != obj.getClass())
91
			return false;
92
		AuthUser other = (AuthUser) obj;
93
		if (emailId == null) {
94
			if (other.emailId != null)
95
				return false;
96
		} else if (!emailId.equals(other.emailId))
97
			return false;
98
		return true;
99
	}
100
 
101
 
102
 
103
	public String getEmailId() {
104
		return emailId;
105
	}
106
 
107
 
108
 
109
	public void setEmailId(String emailId) {
110
		this.emailId = emailId;
111
	}
112
 
113
 
114
 
115
	public String getMobileNumber() {
116
		return mobileNumber;
117
	}
118
 
119
 
120
 
121
	public void setMobileNumber(String mobileNumber) {
122
		this.mobileNumber = mobileNumber;
123
	}
124
 
125
 
126
 
127
	public LocalDateTime getCreatedTimestamp() {
128
		return createdTimestamp;
129
	}
130
 
131
 
132
 
133
	public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
134
		this.createdTimestamp = createdTimestamp;
135
	}
136
 
137
 
138
 
139
	public LocalDateTime getLastLoginTimestamp() {
140
		return lastLoginTimestamp;
141
	}
142
 
143
 
144
 
145
	public void setLastLoginTimestamp(LocalDateTime lastLoginTimestamp) {
146
		this.lastLoginTimestamp = lastLoginTimestamp;
147
	}
148
 
149
 
150
 
151
	@Override
152
	public String toString() {
153
		return "AuthUser [emailId=" + emailId + ", firstName=" + firstName + ", lastName=" + lastName
154
				+ ", mobileNumber=" + mobileNumber + ", password=" + password + ", createdTimestamp=" + createdTimestamp
155
				+ ", lastLoginTimestamp=" + lastLoginTimestamp + "]";
156
	}
157
 
158
 
159
 
160
}