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

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalTime;

@Data
public class DeviceOpConfigDto {

    /**
     * token认证
     */
    @ApiModelProperty(value = "认证token", required = true)
    private String token;

    @ApiModelProperty(value = "设备sn", required = true)
    private String sn;

    /**
     * ==============================20230920设备配置额外增加====================================
     */
    @ApiModelProperty(value = "是否启用支付宝人脸能力 默认：true", required = true)
    private Boolean useAlipayFace;

    @ApiModelProperty(value = "联动平台地址")
    private String linkageAds;

    @ApiModelProperty(value = "刷脸成功结果页时长 1-10 默认值2")
    @Min(value = 1, message = "请输入1-10的数字")
    @Max(value = 10, message = "请输入1-10的数字")
    private Integer successPageTime;

    @ApiModelProperty(value = "刷脸失败结果页时长 1-10 默认值5")
    @Min(value = 1, message = "请输入1-10的数字")
    @Max(value = 10, message = "请输入1-10的数字")
    private Integer failPageTime;

    @ApiModelProperty(value = "zoloConfig摄像头配置")
    private ZoloConfigDto zoloConfig;

    @ApiModelProperty(value = "是否启用身份证功能 默认：true")
    private Boolean useIdcard;

    @ApiModelProperty(value = "是否人证比对 默认：false")
    private Boolean usePersonCard;

    @ApiModelProperty(value = "是否启用二维码功能 默认：true")
    private Boolean useQrcode;

    @ApiModelProperty(value = "是否启用联动平台 默认：true")
    private Boolean useLinkage;

    @ApiModelProperty(value = "刷脸模式: 点击/自动 click/auto  默认 auto")
    private String faceMode;

    @ApiModelProperty(value = "点击刷脸按钮文本  默认 点击开始刷脸核验")
    private String clickButtonText;

    @ApiModelProperty(value = "是否抓拍人脸 默认：false")
    private Boolean isCaptureFace;

    @ApiModelProperty(value = "need1V1是否使用支付宝刷证提示页 默认：true")
    @JsonProperty("isNeed1V1")
    private Boolean isNeed1V1;

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

    @ApiModelProperty(value = "RS232默认信号")
    private String signalNo;

    @ApiModelProperty(value = "补光灯: 自动 auto 默认:auto")
    private String lightMode;

    @ApiModelProperty(value = "语音音量 0-100 默认值80")
    @Min(value = 0, message = "请输入0-100的数字")
    @Max(value = 100, message = "请输入0-100的数字")
    private Integer volume;

    @ApiModelProperty(value = "成功语音 默认: 请通行")
    private String sucVoice;

    @ApiModelProperty(value = "成功文字 默认: 请通行")
    private String sucText;

    @ApiModelProperty(value = "失败语音 默认: 比对失败,请联系现场工作人员")
    private String failVoice;

    @ApiModelProperty(value = "失败文字 默认: 比对失败,请联系现场工作人员")
    private String failText;

    @ApiModelProperty(value = "隐藏底部导航栏 默认: false")
    private Boolean hideNavigationBar;

    @ApiModelProperty(value = "禁止下拉通知栏 默认: false")
    private Boolean forbidPullDown;

    @ApiModelProperty(value = "首页图片")
    private String homePageUrl;

    @ApiModelProperty(value = "过渡图片")
    private String transitionPageUrl;

    /**
     * ============================20231007添加===========================
     */
    @ApiModelProperty(value = "设备在线状态心跳地址")
    private String heartTrackingUrl;

    @ApiModelProperty(value = "进出记录推送地址")
    private String transitPushUrl;

    @ApiModelProperty(value = "是否显示顶部栏")
    private Boolean showTopBar;

    @ApiModelProperty(value = "顶部栏左边显示内容")
    private String leftTopBarText;

    @ApiModelProperty(value = "顶部栏右边显示内容")
    private String rightTopBarText;

    /**
     * ============================20231019添加===========================
     */
    @ApiModelProperty(value = "通行方式: 通用(normal) 进站刷脸全量通行(inStation)  出站刷脸全量通行(outStation)")
    private String passWay;
    /**
     * ============================20231110添加===========================
     */
    @ApiModelProperty(value = "是否开启年龄限制")
    private Boolean isOpenAgeLimit;

    @ApiModelProperty(value = "限制区间-开始年龄")
    private Integer limitSectionStart;

    @ApiModelProperty(value = "限制区间-结束年龄")
    private Integer limitSectionEnd;

    @ApiModelProperty(value = "禁止进入文本")
    private String ageForbidText;

    @ApiModelProperty(value = "设备管理员密码")
    private String mpassword;
    /**
     * ============================20231128添加===========================
     */
    @ApiModelProperty(value = "是否开启护照机")
    private Boolean isOpenPassport;

    @ApiModelProperty(value = "是否推送门磁信号")
    private Boolean isPushGM;

    @ApiModelProperty(value = "门磁信号推送地址")
    @JsonProperty("GMAddress")
    private String GMAddress;

    @ApiModelProperty(value = "门磁信号推送频率")
    @JsonProperty("GMFrequency")
    private Integer GMFrequency;

    @ApiModelProperty(value = "应用是否自启动")
    private Boolean autoLaunch;
    /**
     * ============================20231215添加===========================
     */
    @ApiModelProperty(value = "是否开启进场识别")
    private Boolean useEntryDetector;


    @ApiModelProperty(value = "在线日志推送地址")
    private String logPushUrl;
    /**
     * @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;

    /**
     * ============================20240105添加===========================
     */
    @ApiModelProperty(value = "进场刷脸模式")
    private String entryFaceMode;

    /**
     * ============================20240228添加===========================
     */
    /**
     * @see cn.hanghui.outapi.platform.tenant.entity.enums.UserOutputModeEnum
     */
    @ApiModelProperty(value = "用户信息输出模式  NoOutput:不输出（默认）， AnalogSignal:阅读器模拟信号")
    private String userOutputMode;

    @ApiModelProperty(value = "是否设备实名入库 默认false")
    private Boolean authVerifiedFacein;

    @ApiModelProperty(value = "是否开启手动输入证件号 默认false")
    private Boolean manualInIdCard;

    @ApiModelProperty(value = "身份证阅读器品牌 IdCardReaderBrandEnum")
    @NotNull(message = "请选择身份证阅读器品牌")
    private Integer idCardReaderBrand;

    /**
     * ============================20240503添加===========================
     */
    @ApiModelProperty(value = "是否解析身份证照片 0-关闭 1-开启 默认-1")
    private Integer analysisPhoto;
    @ApiModelProperty(value = "是否解析身份证指纹 0-关闭 1-开启 默认-0")
    private Integer analysisFingerprint;
    /**
     * ============================20240506添加===========================
     */
    @ApiModelProperty(value = "同一人刷证间隔时间 取值范围0-20 默认-3")
    private Integer idCardInterval;

    /**
     * ============================20240520添加===========================
     */
    @ApiModelProperty(value = "RS232开门信号串口地址")
    private String doorSerialPort;

    @ApiModelProperty(value = "是否开启定时重启 true-是 false-否 默认-false")
    private Boolean scheduledRestart;
    @ApiModelProperty(value = "定时重启时间HH:mm:ss")
    private LocalTime scheduledRestartTime;


    @ApiModelProperty(value = "开闭时间间隔（s）")
    private Integer openCloseInterval;
    @ApiModelProperty(value = "信号间间隔（s）")
    private Integer signalInterval;
    /**@see cn.hanghui.outapi.platform.tenant.entity.enums.RelayOpenModelEnum*/
    @ApiModelProperty(value = "继电器开门模式 1-开-闭信号 2-开-门磁-闭信息")
    private Integer relayOpenModel;
}
