Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33305 ranu 1
package com.spice.profitmandi.dao.model;
2
 
3
import java.time.LocalDateTime;
4
import java.time.format.DateTimeFormatter;
5
import java.util.Objects;
6
 
7
public class VerifiedB2CUsersModel {
8
 
9
    private String firstName;
10
    private String lastName;
11
    private String emailId;
12
    private String mobileNumber;
13
    private String city;
14
    private Integer pinCode;
15
    private String state;
16
    private LocalDateTime createTimestamp;
17
 
18
    public VerifiedB2CUsersModel(String firstName, String lastName, String emailId, String mobileNumber, String city, Integer pinCode, String state, LocalDateTime createTimestamp) {
19
        super();
20
        this.firstName = firstName;
21
        this.lastName = lastName;
22
        this.emailId = emailId;
23
        this.mobileNumber = mobileNumber;
24
        this.city = city;
25
        this.pinCode = pinCode;
26
        this.state = state;
27
        this.createTimestamp = createTimestamp;
28
    }
29
 
30
    public String getFirstName() {
31
        return firstName;
32
    }
33
 
34
    public void setFirstName(String firstName) {
35
        this.firstName = firstName;
36
    }
37
 
38
    public String getLastName() {
39
        return lastName;
40
    }
41
 
42
    public void setLastName(String lastName) {
43
        this.lastName = lastName;
44
    }
45
 
46
    public String getEmailId() {
47
        return emailId;
48
    }
49
 
50
    public void setEmailId(String emailId) {
51
        this.emailId = emailId;
52
    }
53
 
54
    public String getMobileNumber() {
55
        return mobileNumber;
56
    }
57
 
58
    public void setMobileNumber(String mobileNumber) {
59
        this.mobileNumber = mobileNumber;
60
    }
61
 
62
    public String getCity() {
63
        return city;
64
    }
65
 
66
    public void setCity(String city) {
67
        this.city = city;
68
    }
69
 
70
    public Integer getPinCode() {
71
        return pinCode;
72
    }
73
 
74
    public void setPinCode(Integer pinCode) {
75
        this.pinCode = pinCode;
76
    }
77
 
78
    public String getState() {
79
        return state;
80
    }
81
 
82
    public void setState(String state) {
83
        this.state = state;
84
    }
85
 
86
    public LocalDateTime getCreateTimestamp() {
87
        return createTimestamp;
88
    }
89
 
90
    public void setCreateTimestamp(LocalDateTime createTimestamp) {
91
        this.createTimestamp = createTimestamp;
92
    }
93
 
94
    public String getFormattedCreateTimestamp() {
95
        if (createTimestamp == null) {
96
            return null;
97
        }
98
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
99
        return createTimestamp.format(formatter);
100
    }
101
 
102
    @Override
103
    public boolean equals(Object o) {
104
        if (this == o) return true;
105
        if (o == null || getClass() != o.getClass()) return false;
106
        VerifiedB2CUsersModel that = (VerifiedB2CUsersModel) o;
107
        return Objects.equals(firstName, that.firstName) && Objects.equals(lastName, that.lastName) && Objects.equals(emailId, that.emailId) && Objects.equals(mobileNumber, that.mobileNumber) && Objects.equals(city, that.city) && Objects.equals(pinCode, that.pinCode) && Objects.equals(state, that.state) && Objects.equals(createTimestamp, that.createTimestamp);
108
    }
109
 
110
    @Override
111
    public int hashCode() {
112
        return Objects.hash(firstName, lastName, emailId, mobileNumber, city, pinCode, state, createTimestamp);
113
    }
114
 
115
    @Override
116
    public String toString() {
117
        return "VerifiedB2CUsersModel{" +
118
                "firstName='" + firstName + '\'' +
119
                ", lastName='" + lastName + '\'' +
120
                ", emailId='" + emailId + '\'' +
121
                ", mobileNumber='" + mobileNumber + '\'' +
122
                ", city='" + city + '\'' +
123
                ", pinCode=" + pinCode +
124
                ", state='" + state + '\'' +
125
                ", createTimestamp=" + createTimestamp +
126
                '}';
127
    }
128
}