package cn.hanghui.outapi.platform.tenant.entity.po;

import cn.hanghui.outapi.platform.common.entity.po.Base;
import cn.hanghui.outapi.platform.tenant.entity.dto.ZoloConfigDto;
import cn.hanghui.outapi.platform.tenant.typehandle.StringTypeHandler;
import cn.hanghui.outapi.platform.tenant.typehandle.ZoloConfigDtoHandler;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * @author shisl
 * @package cn.hanghui.outapi.platform.tenant.entity.po
 * @class HHCultureDevice
 * @date 2024/7/19 上午10:44
 * @description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "hh_culture_device", autoResultMap = true)
public class HhCultureDevice extends Base {


    //设备基本配置
    @ApiModelProperty(value = "设备sn")
    private String sn;

    @ApiModelProperty(value = "购买方公司id")
    private Long purchaserId;

    //基本信息配置
    @ApiModelProperty(value = "应用类型id")
    private Long applicationTypeId;
    @ApiModelProperty(value = "设备型号(硬件)id")
    private Long deviceModelHardwareId;
    @ApiModelProperty(value = "设备型号(环境)id")
    private Long deviceModelEnvironmentId;
    @ApiModelProperty(value = "系统类型 1-蚂蚁OS 2-非蚂蚁OS")
    private Integer systemTypeCode;

    //支付宝刷脸启动核点配置
    @ApiModelProperty(value = "商户id tenantId")
    private Long tenantId;
    @ApiModelProperty(value = "用户库id")
    private Long userLibId;
    @ApiModelProperty(value = "isv的商户id")
    private String isvPid;
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.CameraTypeEnum
     */
    @ApiModelProperty(value = "摄像头类型 IR-双目  3D-3D结构光 ")
    private String cameraType;
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.CameraBrandEnum
     */
    @ApiModelProperty(value = "品牌 Normal-通用   Mario-马里奥")
    private String cameraBrand;

    @ApiModelProperty(value = "zoloConfig摄像头配置")
    @TableField(value = "zolo_config", typeHandler = ZoloConfigDtoHandler.class)
    private ZoloConfigDto zoloConfig;

    //采集配置
    @ApiModelProperty(value = "是否启用身份证功能 默认：true")
    private Boolean useIdcard;
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.IdCardReaderBrandEnum
     */
    @ApiModelProperty(value = "身份证阅读器品牌 IdCardReaderBrandEnum")
    private Integer idCardReaderBrand;
    @ApiModelProperty(value = "是否解析身份证照片 0-否 1-是 默认-1")
    private Integer analysisPhoto;
    @ApiModelProperty(value = "是否解析身份证指纹 0-否 1-是 默认-0")
    private Integer analysisFingerprint;
    @ApiModelProperty(value = "是否人证比对 默认：false")
    private Boolean usePersonCard;
    @ApiModelProperty(value = "同证间隔时间 取值范围0-20 默认-7")
    private Integer idCardInterval;

    @ApiModelProperty(value = "是否启用二维码功能 默认：true")
    private Boolean useQrcode;
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.QrCodeReaderBrandEnum
     */
    @ApiModelProperty(value = "二维码读头品牌 QrCodeReaderBrandEnum")
    private Integer qrCodeReaderBrand;
    @ApiModelProperty(value = "二维码读头通信模式 1-虚拟串口 2-串口serialPort")
    private Integer qrCodeReaderCommunicationMode;
    @ApiModelProperty(value = "二维码读头串口地址serialPort")
    private String qrCodeReaderSerialPort;
    @ApiModelProperty(value = "同码间隔时间 取值范围0-20 默认-7")
    private Integer qrCodeInterval;

    @ApiModelProperty(value = "是否开启手动输入 默认true")
    private Boolean manualIn;
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.ManualInParamsEnum
     */
    @ApiModelProperty(value = "手动输入内容参数项")
    @TableField(value = "manual_in_params", typeHandler = StringTypeHandler.class)
    private List<String> manualInParams;

    @ApiModelProperty(value = "（new）是否开启进场识别 默认false")
    private Boolean entryIdentifySwitch;
    @ApiModelProperty(value = "（new）显示点击刷脸按钮 默认true")
    private Boolean clickScanFaceButtonSwitch;
    @ApiModelProperty(value = "（new）点击刷脸按钮文本 默认：点击开始刷脸核验")
    private String clickScanFaceButtonText;
    @ApiModelProperty(value = "（new）刷脸失败提示页配置图片")
    private String scanFaceFailedTipUrl;

    //三方接口接入配置
    @ApiModelProperty(value = "是否启用核验接口 默认：false")
    private Boolean useLinkage;
    @ApiModelProperty(value = "联动平台地址")
    private String linkageAds;
    @ApiModelProperty(value = "核验接口数据是否加解密 默认true")
    private Boolean checkVerifyEncryptSwitch;
    @ApiModelProperty(value = "核验接口数据是否加解密appKey")
    private String checkVerifyEncryptAppKey;
    @ApiModelProperty(value = "核验接口数据是否加解密appSecrete")
    private String checkVerifyEncryptAppSecret;
    @ApiModelProperty(value = "核验接口数据是否加解密PrivateKey")
    private String checkVerifyEncryptPrivateKey;
    @ApiModelProperty(value = "核验接口失败重试次数 默认-1")
    private Integer checkVerifyRetryTimes;
    @ApiModelProperty(value = "核验接口超时提示语 默认-核验接口超时")
    private String checkVerifyTimeoutTips;
    @ApiModelProperty(value = "核验接口失败提示语 默认-核验接口失败")
    private String checkVerifyFailedTips;
    @ApiModelProperty(value = "核验接口超时时间：4s")
    private Integer linkTimeout;

    //结果页配置
    @ApiModelProperty(value = "刷脸成功结果页时长 1-10 默认值2")
    private Integer successPageTime;
    @ApiModelProperty(value = "成功语音 默认: 请通行")
    private String sucVoice;
    @ApiModelProperty(value = "成功文字 默认: 请通行")
    private String sucText;
    @ApiModelProperty(value = "刷脸失败结果页时长 1-10 默认值5")
    private Integer failPageTime;
    @ApiModelProperty(value = "刷脸失败文字 默认: 开通失败")
    private String failText;
    @ApiModelProperty(value = "刷脸失败语音 默认: 开通失败")
    private String failVoice;
    @ApiModelProperty(value = "默认单选页时长 默认120")
    private Integer singlePageTime;
    @ApiModelProperty(value = "默认多选页时长 默认120")
    private Integer multiPageTime;
    @ApiModelProperty(value = "默认等待页时长 默认120")
    private Integer waitPageTime;


    // 硬件模组配置
    @ApiModelProperty(value = "开门信号: 继电器/RS232 default/RS232 默认：default")
    private String useSerialPort;

    @ApiModelProperty(value = "RS232开门信号串口地址")
    private String doorSerialPort;
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.RelayOpenModelEnum
     */
    @ApiModelProperty(value = "继电器开门模式 1-开-闭信号 2-开-门磁-闭信息")
    private Integer relayOpenModel;
    @ApiModelProperty(value = "门磁串口地址")
    private String doorSerialPortAddress;
    @ApiModelProperty(value = "门磁超时时间（s）")
    private Integer gateTimeOut;
    @ApiModelProperty(value = "补光灯: 自动 auto 默认:auto")
    private String lightMode;
    @ApiModelProperty(value = "开闭时间间隔（s）")
    private Integer openCloseInterval;
    @ApiModelProperty(value = "信号间间隔（s）")
    private Integer signalInterval;

    //推送配置
    @ApiModelProperty(value = "应用状态推送地址")
    private String heartTrackingUrl;
    @ApiModelProperty(value = "在线日志推送地址")
    private String logPushUrl;
    @ApiModelProperty(value = "进出记录推送地址")
    private String transitPushUrl;

    //系统配置
    @ApiModelProperty(value = "设备管理员密码")
    private String mpassword;
    @ApiModelProperty(value = "语音音量 0-100 默认值80")
    private Integer volume;
    @ApiModelProperty(value = "隐藏底部导航栏 默认: false")
    private Boolean hideNavigationBar;
    @ApiModelProperty(value = "禁止下拉通知栏 默认: false")
    private Boolean forbidPullDown;
    @ApiModelProperty(value = "首页图片")
    private String homePageUrl;
    @ApiModelProperty(value = "过渡图片")
    private String transitionPageUrl;
    @ApiModelProperty(value = "应用是否自启动")
    private Boolean autoLaunch;

    /**
     * 授权状态  0：未授权 1：已授权
     */
    private Boolean status = Boolean.FALSE;
    /**
     * 第一次授权时间
     */
    private Date firstAuthTime;
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.ResultPageTemplateEnum
     */
    @ApiModelProperty(value = "结果页模版 1-通用版 2-悬浮版")
    private Integer resultPageTemplate;

    @ApiModelProperty(value = "ic14443-是否启用IC卡ISO14443A功能 false-否（默认） true-是")
    private Boolean ic14443IcCardFunction;
    @ApiModelProperty(value = "ic14443-阅读器品牌 ReaderBrandEnum")
    private Integer ic14443ReaderBrand;
    @ApiModelProperty(value = "ic14443-读取扇区-数字；0-99 默认15")
    private Integer ic14443ReaderSectorNumbers;
    @ApiModelProperty(value = "ic14443-读取块-填写,数字逗号隔开 0,1,2,3 长度100 默认0")
    private String ic14443ReaderBlock;
    @ApiModelProperty(value = "ic14443-读取密钥-填写,默认 FFFFFFFFFFFF 长度100 默认12个F")
    private String ic14443ReaderKey;
    @ApiModelProperty(value = "ic14443-起始偏移量-数字 0-100 默认 0")
    private Integer ic14443StartOffset;
    @ApiModelProperty(value = "ic14443-末尾偏移量-数字 0-100 默认 0")
    private Integer ic14443EndOffset;
    @ApiModelProperty(value = "ic14443-是否人证比对；false-否（默认） true-是")
    private Boolean ic14443PersonCardComparison;
    @ApiModelProperty(value = "ic14443-同卡间隔时间；默认7")
    private Integer ic14443SameCardIntervalTime;
    @ApiModelProperty(value = "ic15693-是否启用IC卡ISO14443A功能 false-否（默认） true-是")
    private Boolean ic15693IcCardFunction;
    @ApiModelProperty(value = "ic15693-阅读器品牌 ReaderBrandEnum")
    private Integer ic15693ReaderBrand;
    @ApiModelProperty(value = "ic15693-读取块-填写,数字逗号隔开 0,1,2,3 长度100 默认0")
    private String ic15693ReaderBlock;
    @ApiModelProperty(value = "ic15693-起始偏移量-数字 0-100 默认 0")
    private Integer ic15693StartOffset;
    @ApiModelProperty(value = "ic15693-末尾偏移量-数字 0-100 默认 0")
    private Integer ic15693EndOffset;
    @ApiModelProperty(value = "ic15693-是否人证比对；false-否（默认） true-是")
    private Boolean ic15693PersonCardComparison;
    @ApiModelProperty(value = "ic15693-同卡间隔时间；默认7")
    private Integer ic15693SameCardIntervalTime;

    @ApiModelProperty(value = "到期日期")
    private LocalDate expirationDate;

}
