Subversion Repositories SmartDukaan

Rev

Rev 24383 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.entity.auth;

import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "auth.auth_user", schema = "auth")
public class AuthUser {
        
        @Id
        @Column(name = "email_id", unique=true, updatable=false)
        private String emailId;

        @Column(name="first_name", nullable=false)
        private String firstName;

        @Column(name="last_name")
        private String lastName;
        
        public String getFirstName() {
                return firstName;
        }



        public void setFirstName(String firstName) {
                this.firstName = firstName;
        }



        public String getLastName() {
                return lastName;
        }



        public void setLastName(String lastName) {
                this.lastName = lastName;
        }



        public String getPassword() {
                return password;
        }



        public void setPassword(String password) {
                this.password = password;
        }



        @Column(name = "mobile_number", unique=true)
        private String mobileNumber;
        
        @Column(name = "password")
        private String password;
        
        @Column(name = "created_timestamp")
        private LocalDateTime createdTimestamp;
        
        @Column(name = "last_login_timestap", unique=true, updatable=true)
        private LocalDateTime lastLoginTimestamp;
        
        

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + ((emailId == null) ? 0 : emailId.hashCode());
                return result;
        }



        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                AuthUser other = (AuthUser) obj;
                if (emailId == null) {
                        if (other.emailId != null)
                                return false;
                } else if (!emailId.equals(other.emailId))
                        return false;
                return true;
        }



        public String getEmailId() {
                return emailId;
        }



        public void setEmailId(String emailId) {
                this.emailId = emailId;
        }



        public String getMobileNumber() {
                return mobileNumber;
        }



        public void setMobileNumber(String mobileNumber) {
                this.mobileNumber = mobileNumber;
        }



        public LocalDateTime getCreatedTimestamp() {
                return createdTimestamp;
        }



        public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
                this.createdTimestamp = createdTimestamp;
        }



        public LocalDateTime getLastLoginTimestamp() {
                return lastLoginTimestamp;
        }



        public void setLastLoginTimestamp(LocalDateTime lastLoginTimestamp) {
                this.lastLoginTimestamp = lastLoginTimestamp;
        }



        @Override
        public String toString() {
                return "AuthUser [emailId=" + emailId + ", firstName=" + firstName + ", lastName=" + lastName
                                + ", mobileNumber=" + mobileNumber + ", password=" + password + ", createdTimestamp=" + createdTimestamp
                                + ", lastLoginTimestamp=" + lastLoginTimestamp + "]";
        }
        

        
}