Subversion Repositories SmartDukaan

Rev

Rev 23297 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23297 Rev 26783
Line 14... Line 14...
14
 
14
 
15
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
15
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
16
import com.spice.profitmandi.dao.enumuration.dtr.OtpType;
16
import com.spice.profitmandi.dao.enumuration.dtr.OtpType;
17
 
17
 
18
@Entity
18
@Entity
19
@Table(name="dtr.otp",schema="dtr")
19
@Table(name = "dtr.otp", schema = "dtr")
20
public class Otp{
20
public class Otp {
21
	/**
21
	/**
22
	 * 
22
	 * 
23
	 */
23
	 */
24
	@Id
24
	@Id
25
	@GeneratedValue(strategy=GenerationType.IDENTITY)
25
	@GeneratedValue(strategy = GenerationType.IDENTITY)
26
	private int id;
26
	private int id;
27
	
-
 
28
	private String email;
-
 
29
	
27
 
30
	@Column(length = 10)
28
	@Column(length = 10)
31
	private String mobile;
29
	private String mobile;
32
	
30
 
33
	@Column(length = 5)
31
	@Column(length = 5)
34
	private String otp;
32
	private String otp;
35
	
33
 
36
	@Enumerated(EnumType.STRING)
34
	@Enumerated(EnumType.STRING)
37
	private OtpType otpType;
35
	private OtpType otpType;
38
	
36
 
39
	@Convert(converter = LocalDateTimeAttributeConverter.class)
37
	@Convert(converter = LocalDateTimeAttributeConverter.class)
40
	private LocalDateTime createdOn;
38
	private LocalDateTime createdOn;
41
	
39
 
42
	@Convert(converter = LocalDateTimeAttributeConverter.class)
40
	@Convert(converter = LocalDateTimeAttributeConverter.class)
43
	private LocalDateTime expiryTimestamp;
41
	private LocalDateTime expiryTimestamp;
44
	
42
 
45
	@Column(columnDefinition="tinyint(1) default 0")
43
	@Column(columnDefinition = "tinyint(1) default 0")
46
	private boolean expired;
44
	private boolean expired;
47
	
45
 
48
	@Column(columnDefinition="tinyint(1) default 0")
46
	@Column(columnDefinition = "tinyint(1) default 0")
49
	private boolean verified;
47
	private boolean verified;
50
	
48
 
51
	private int tryCount;
49
	private int tryCount;
52
	
50
 
53
	public int getTryCount() {
51
	public int getTryCount() {
54
		return tryCount;
52
		return tryCount;
55
	}
53
	}
-
 
54
 
56
	public void setTryCount(int tryCount) {
55
	public void setTryCount(int tryCount) {
57
		this.tryCount = tryCount;
56
		this.tryCount = tryCount;
58
	}
57
	}
-
 
58
 
59
	public boolean isVerified() {
59
	public boolean isVerified() {
60
		return verified;
60
		return verified;
61
	}
61
	}
-
 
62
 
62
	public void setVerified(boolean verified) {
63
	public void setVerified(boolean verified) {
63
		this.verified = verified;
64
		this.verified = verified;
64
	}
65
	}
-
 
66
 
65
	public int getId() {
67
	public int getId() {
66
		return id;
68
		return id;
67
	}
69
	}
-
 
70
 
68
	public void setId(int id) {
71
	public void setId(int id) {
69
		this.id = id;
72
		this.id = id;
70
	}
73
	}
-
 
74
 
71
	public String getOtp() {
75
	public String getOtp() {
72
		return otp;
76
		return otp;
73
	}
77
	}
-
 
78
 
74
	public void setOtp(String otp) {
79
	public void setOtp(String otp) {
75
		this.otp = otp;
80
		this.otp = otp;
76
	}
81
	}
-
 
82
 
77
	public OtpType getOtpType() {
83
	public OtpType getOtpType() {
78
		return otpType;
84
		return otpType;
79
	}
85
	}
-
 
86
 
80
	public void setOtpType(OtpType otpType) {
87
	public void setOtpType(OtpType otpType) {
81
		this.otpType = otpType;
88
		this.otpType = otpType;
82
	}
89
	}
-
 
90
 
83
	public LocalDateTime getCreatedOn() {
91
	public LocalDateTime getCreatedOn() {
84
		return createdOn;
92
		return createdOn;
85
	}
93
	}
-
 
94
 
86
	public void setCreatedOn(LocalDateTime createdOn) {
95
	public void setCreatedOn(LocalDateTime createdOn) {
87
		this.createdOn = createdOn;
96
		this.createdOn = createdOn;
88
	}
97
	}
-
 
98
 
89
	public LocalDateTime getExpiryTimestamp() {
99
	public LocalDateTime getExpiryTimestamp() {
90
		return expiryTimestamp;
100
		return expiryTimestamp;
91
	}
101
	}
-
 
102
 
92
	public void setExpiryTimestamp(LocalDateTime expiryTimestamp) {
103
	public void setExpiryTimestamp(LocalDateTime expiryTimestamp) {
93
		this.expiryTimestamp = expiryTimestamp;
104
		this.expiryTimestamp = expiryTimestamp;
94
	}
105
	}
-
 
106
 
95
	public boolean isExpired() {
107
	public boolean isExpired() {
96
		return expired;
108
		return expired;
97
	}
109
	}
-
 
110
 
98
	public void setExpired(boolean expired) {
111
	public void setExpired(boolean expired) {
99
		this.expired = expired;
112
		this.expired = expired;
100
	}
113
	}
101
	public String getEmail() {
-
 
102
		return email;
-
 
103
	}
-
 
104
	public void setEmail(String email) {
-
 
105
		this.email = email;
-
 
106
	}
114
 
107
	public String getMobile() {
115
	public String getMobile() {
108
		return mobile;
116
		return mobile;
109
	}
117
	}
-
 
118
 
110
	public void setMobile(String mobile) {
119
	public void setMobile(String mobile) {
111
		this.mobile = mobile;
120
		this.mobile = mobile;
112
	}
121
	}
113
	
-
 
114
	
122
 
115
	@Override
123
	@Override
116
	public int hashCode() {
124
	public int hashCode() {
117
		final int prime = 31;
125
		final int prime = 31;
118
		int result = 1;
126
		int result = 1;
119
		result = prime * result + id;
127
		result = prime * result + id;
120
		return result;
128
		return result;
121
	}
129
	}
-
 
130
 
122
	@Override
131
	@Override
123
	public boolean equals(Object obj) {
132
	public boolean equals(Object obj) {
124
		if (this == obj)
133
		if (this == obj)
125
			return true;
134
			return true;
126
		if (obj == null)
135
		if (obj == null)
Line 130... Line 139...
130
		Otp other = (Otp) obj;
139
		Otp other = (Otp) obj;
131
		if (id != other.id)
140
		if (id != other.id)
132
			return false;
141
			return false;
133
		return true;
142
		return true;
134
	}
143
	}
-
 
144
 
135
	@Override
145
	@Override
136
	public String toString() {
146
	public String toString() {
137
		return "Otp [id=" + id + ", email=" + email + ", mobile=" + mobile + ", otp=" + otp + ", otpType=" + otpType
147
		return "Otp [id=" + id + ", mobile=" + mobile + ", otp=" + otp + ", otpType=" + otpType + ", createdOn="
138
				+ ", createdOn=" + createdOn + ", expiryTimestamp=" + expiryTimestamp + ", expired=" + expired + "]";
148
				+ createdOn + ", expiryTimestamp=" + expiryTimestamp + ", expired=" + expired + ", verified=" + verified
-
 
149
				+ ", tryCount=" + tryCount + "]";
139
	}
150
	}
140
	
151
 
141
}
152
}
142
153