/*
 * @Author: Kane
 * @Date: 2022-12-15 11:17:26
 * @LastEditors: Kane
 * @LastEditTime: 2023-01-10 14:58:53
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckResult.java
 * @Description: 
 * 
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 */

package com.cpic.xim.web.controllers.account;

import com.cpic.xim.utils.account.CpicXIMStaffInfo;
import com.fasterxml.jackson.annotation.*;;

public class StaffInfoQueryResult
{
    StaffInfoQueryResult()
    {}

    public boolean isSuccess()
    {
        return success;
    }

    public void setSuccess( boolean success )
    {
        this.success = success;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage( String message )
    {
        this.message = message;
    }

    public CpicXIMStaffInfo getStaffInfo()
    {
        return staffInfo;
    }

    public void setStaffInfo( CpicXIMStaffInfo staffInfo )
    {
        this.staffInfo = staffInfo;
    }


    public String getToken()
    {
        return token;
    }

    public void setToken( String token )
    {
        this.token = token;
    }

    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + (success ? 1231 : 1237);
        result = prime * result + ((message == null) ? 0 : message.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;
        StaffInfoQueryResult other = (StaffInfoQueryResult) obj;
        if ( success != other.success )
            return false;
        if ( message == null )
        {
            if ( other.message != null )
                return false;
        } else if ( !message.equals( other.message ) )
            return false;
        return true;
    }

    // 验证结果状态，true为成功，false为失败
    @JsonProperty( "success" )
    private boolean success;

    // 验证结果消息字符串，用来提示前端。
    @JsonProperty( "message" )
    private String message;

    // 用户的token
    @JsonProperty( "token" )
    private String token;

    // 验证成功后查询到的人员信息。
    @JsonProperty( "staff_info" )
    CpicXIMStaffInfo staffInfo;

}
