登录信息实体类

package com.*.*.*.model;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 登录信息实体类
 * <p/>
 * Date: 2010-2-2
 *
 * @author *
 * @version 1.0
 */
public class LoginInfo
{
    private String loginName;       //登录名称
    private String loginPwd;        //登录密码

    private String userID;          //用户的唯一标识
    private String nickName;        //用户昵称
    private String contactPhone;    //手机号码
    private String email;           //Email
    private String registerTime;      //注册时间
    private String memberIcon;      //图像ICON路径
    private String experienceWorth; //经验值
    private String status;          //会员状态(0:已禁用;1:正常)
    private int point;              //积分

    private int userLevel;                      //用户的身份级别
    private Date lastLoginTime = new Date();    //登录时间
    private String loginResult;                 //登录结果

    private Map<String, Integer> rightsMap = new HashMap<String, Integer>();

    public LoginInfo()
    {
    }

    public LoginInfo(String userID)
    {
        this(userID, userID, "");
    }

    public LoginInfo(String loginName, String loginPwd)
    {
        this("", loginName, loginPwd);
    }

    public LoginInfo(String userID, String loginName, String nickName)
    {
        this.userID = userID;
        this.loginName = loginName;
        this.nickName = nickName;
    }

    /**
     * 判断当前登陆的用户是否具有管理员权限
     *
     * @return boolean
     */
    public boolean isAdmin()
    {
        return userLevel == 0;
    }

    public String getContactPhone()
    {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone)
    {
        this.contactPhone = contactPhone;
    }

    public String getLoginPwd()
    {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd)
    {
        this.loginPwd = loginPwd;
    }

    public String getLoginName()
    {
        return loginName;
    }

    public void setLoginName(String loginName)
    {
        this.loginName = loginName;
    }

    public Date getLastLoginTime()
    {
        return lastLoginTime;
    }

    public int getUserLevel()
    {
        return userLevel;
    }

    public void setUserLevel(int userLevel)
    {
        this.userLevel = userLevel;
    }

    public void setLastLoginTime(Date lastLoginTime)
    {
        this.lastLoginTime = lastLoginTime;
    }


    /** @return the loginResult */
    public String getLoginResult()
    {
        return loginResult;
    }

    /** @param loginResult the loginResult to set */
    public void setLoginResult(String loginResult)
    {
        this.loginResult = loginResult;
    }

    public String getNickName()
    {
        return nickName;
    }

    public void setNickName(String nickName)
    {
        this.nickName = nickName;
    }

    public String getUserID()
    {
        return userID;
    }

    public void setUserID(String userID)
    {
        this.userID = userID;
    }

    public Map<String, Integer> getRightsMap()
    {
        return rightsMap;
    }

    public void setRightsMap(Map<String, Integer> rightsMap)
    {
        this.rightsMap = rightsMap;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getRegisterTime()
    {
        return registerTime;
    }

    public void setRegisterTime(String registerTime)
    {
        this.registerTime = registerTime;
    }

    public String getMemberIcon()
    {
        return memberIcon;
    }

    public void setMemberIcon(String memberIcon)
    {
        this.memberIcon = memberIcon;
    }

    public String getExperienceWorth()
    {
        return experienceWorth;
    }

    public void setExperienceWorth(String experienceWorth)
    {
        this.experienceWorth = experienceWorth;
    }

    public String getStatus()
    {
        return status;
    }

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

    public int getPoint()
    {
        return point;
    }

    public void setPoint(int point)
    {
        this.point = point;
    }

    /**
     * Returns a string representation of the object. In general, the
     * <code>toString</code> method returns a string that
     * "textually represents" this object. The result should
     * be a concise but informative representation that is easy for a
     * person to read.
     * It is recommended that all subclasses override this method.
     * <p/>
     * The <code>toString</code> method for class <code>Object</code>
     * returns a string consisting of the name of the class of which the
     * object is an instance, the at-sign character `<code>@</code>', and
     * the unsigned hexadecimal representation of the hash code of the
     * object. In other words, this method returns a string equal to the
     * value of:
     * <blockquote>
     * <pre>
     * getClass().getName() + '@' + Integer.toHexString(hashCode())
     * </pre></blockquote>
     *
     * @return a string representation of the object.
     */
    @Override
    public String toString()
    {
        StringBuilder sb = new StringBuilder();
        sb.append("UserID:").append(this.userID);
        sb.append(",UserName:").append(this.nickName);
        sb.append(",LastLoginTime:").append(this.getLastLoginTime());
        return sb.toString();
    }
}

 

1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值