package com.cygnusa.hyperm.wrappers;

/**
 * Created by John on 9/22/2016.
 * johnbrittop@gmail.com
 */
public class User {

    private String smpin;
    private String emp_code;
    private String password;
    private String fname;
    private String lname;
    private String emailid;
    private String mobileno;
    private String role;
    private String rolename;
    private String doj;
    private String address_1;
    private String address_2;
    private String address_3;
    private String profile_photo;
    private String dob;
    private String country;
    private String state;
    private String zone;
    private String city;
    private String auth_token;
    private String language;
    private String status;
    private String last_password_change;
    private String is_first_login;
    private String is_password_expired;
    private Dealer dealer;
    private String is_redeem_point;
    private String mpin;
    private String min_redeem_point;

    public String getMin_redeem_point() {
        return min_redeem_point;
    }

    public void setMin_redeem_point(String min_redeem_point) {
        this.min_redeem_point = min_redeem_point;
    }

    public String getMpin() {
        return mpin == null ? "" : mpin;
    }

    public void setMpin(String mpin) {
        this.mpin = mpin;
    }

    public String getIs_redeem_point() {
        return is_redeem_point;
    }

    public void setIs_redeem_point(String is_redeem_point) {
        this.is_redeem_point = is_redeem_point;
    }


    public Dealer getDealer() {
        return dealer == null ? new Dealer() : dealer;
    }

    public void setDealer(Dealer dealer) {
        this.dealer = dealer;
    }

    public String getDoj() {
        return doj;
    }

    public void setDoj(String doj) {
        this.doj = doj;
    }


    public String getZone() {
        return zone;
    }

    public void setZone(String zone) {
        this.zone = zone;
    }


    public String getIs_profile_updated() {
        return is_profile_updated;
    }

    public void setIs_profile_updated(String is_profile_updated) {
        this.is_profile_updated = is_profile_updated;
    }

    private String is_profile_updated;

    private String is_married;

    public String getIs_married() {
        return is_married;
    }

    public void setIs_married(String is_married) {
        this.is_married = is_married;
    }

    public String getMarriage_date() {
        return marriage_date;
    }

    public void setMarriage_date(String marriage_date) {
        this.marriage_date = marriage_date;
    }

    private String marriage_date;

    public String getRolename() {
        return rolename;
    }

    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    public String getIs_password_expired() {
        return is_password_expired;
    }

    public void setIs_password_expired(String is_password_expired) {
        this.is_password_expired = is_password_expired;
    }

    public String getSmpin() {
        return smpin;
    }

    public void setSmpin(String smpin) {
        this.smpin = smpin;
    }

    public String getEmp_code() {
        return emp_code == null ? "" : emp_code;
    }

    public void setEmp_code(String emp_code) {
        this.emp_code = emp_code;
    }

    public String getPassword() {
        return password;
    }

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

    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    public String getLname() {
        return lname;
    }

    public void setLname(String lname) {
        this.lname = lname;
    }

    public String getEmailid() {
        return emailid;
    }

    public void setEmailid(String emailid) {
        this.emailid = emailid;
    }

    public String getMobileno() {
        return mobileno;
    }

    public void setMobileno(String mobileno) {
        this.mobileno = mobileno;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getAddress_1() {
        return address_1;
    }

    public void setAddress_1(String address_1) {
        this.address_1 = address_1;
    }

    public String getAddress_2() {
        return address_2;
    }

    public void setAddress_2(String address_2) {
        this.address_2 = address_2;
    }

    public String getAddress_3() {
        return address_3;
    }

    public void setAddress_3(String address_3) {
        this.address_3 = address_3;
    }


    public String getProfile_photo() {
        return profile_photo;
    }

    public void setProfile_photo(String profile_photo) {
        this.profile_photo = profile_photo;
    }

    public String getDob() {
        return dob;
    }

    public void setDob(String dob) {
        this.dob = dob;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getCity() {
        return city == null ? "" : city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getAuth_token() {
        return auth_token;
    }

    public void setAuth_token(String auth_token) {
        this.auth_token = auth_token;
    }


    public String getLanguage() {
        return language == null ? "" : language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getLast_password_change() {
        return last_password_change;
    }

    public void setLast_password_change(String last_password_change) {
        this.last_password_change = last_password_change;
    }

    public String getIs_first_login() {
        return is_first_login;
    }

    public void setIs_first_login(String is_first_login) {
        this.is_first_login = is_first_login;
    }


    public String getName() {
        if (fname != null && !fname.trim().isEmpty()) {
            return fname.trim().replace(" ", "#");
        }

        if (lname != null && !lname.trim().isEmpty()) {
            return lname.trim().replace(" ", "#");
        }
        return "";
    }

    public String getFullName() {
        String name = "";
        if (fname != null && !fname.trim().isEmpty()) {
            name = fname.trim() + " ";
        }

        if (lname != null && !lname.trim().isEmpty()) {
            name = name + lname.trim();
        }
        return name.trim();
    }
}
