package com.supervision.vo.session;

import com.supervision.domain.IrSessionParam;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class SessionParamReqVO {

    private String sessionId;

    /**
     * 名字
     */
    private String name;

    /**
     * 卡号
     */
    private String cardNumber;

    /**
     * 身份证件号
     */
    private String idNumber;

    public SessionParamReqVO() {
    }

    public SessionParamReqVO(String sessionId, String name, String cardNumber, String idNumber) {
        this.sessionId = sessionId;
        this.name = name;
        this.cardNumber = cardNumber;
        this.idNumber = idNumber;
    }

    public List<IrSessionParam> toIrSessionParamList(){

        List<IrSessionParam> paramList = new ArrayList<>();
        paramList.add(new IrSessionParam(sessionId,name2Alias(),name));
        paramList.add(new IrSessionParam(sessionId,cardNumber2Alias(),cardNumber));
        paramList.add(new IrSessionParam(sessionId,idNumber2Alias(),idNumber));

        return paramList;
    }

    public static String name2Alias(){
        return "name";
    }

    public static String cardNumber2Alias(){
        return "jykh";
    }
    public static String idNumber2Alias(){
        return "khrzjhm";
    }

}
