package com.zd.laboratory.onemachine.domain;

import cn.hutool.core.collection.CollUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import java.util.function.Supplier;

/**
 * 签到前置信息VO
 *
 * @Author: zhoupan
 * @Date: 2021/09/15/12:00
 * @Description:
 */
@ApiModel("签到前置信息")
public class SignInPerInfoVO extends SignInfoVO {

    /**
     * 验证错误详情
     */
    @ApiModelProperty("验证信息")
    private List<String> message;


    /**
     * 一般提示信息
     */
    @ApiModelProperty("一般提示信息")
    private List<String> tips;
    /**
     * 验证码
     */
    @ApiModelProperty("验证码")
    private String code;


    /**
     * 验证结果
     */
    private Boolean state;
    @ApiModelProperty("最后一次签到是否未关闭")
    private Boolean lastSignInError;


    public Boolean getLastSignInError() {
        return lastSignInError;
    }

    public void setLastSignInError(Boolean lastSignInError) {
        this.lastSignInError = lastSignInError;
    }

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

    public List<String> getTips() {
        return tips;
    }

    public void setTips(List<String> tips) {
        this.tips = tips;
    }

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

    public void setCode(String code) {
        this.code = code;
    }

    public SignInPerInfoVO(SignInfoVO signInfoVO) {
        super(signInfoVO.getSingInUser(), signInfoVO.getSingInViolation());
    }
    public SignInPerInfoVO() {
        message = new ArrayList<>(1);
        message.add("不存在的签到用户信息!");
        state=false;
    }

    public String getCode() {
        return code;
    }

    public Boolean getState() {
        return CollUtil.isEmpty(message);
    }


    public List<String> getMessage() {
        return message;
    }

}
