package com.xy.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xy.utils.PageBean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 * 设备蓝牙授权
 * </p>
 *
 * @author 谭斌
 * @since 2023-03-24
 */
public class DeviceBluetoothAuthDto {

    @Data
    @Accessors(chain = true)
    public static class SelectList extends Vo {

    }

    @Data
    @Accessors(chain = true)
    public static class Page extends Vo {

        @ApiModelProperty(value = "分页对象", required = true)
        private PageBean page;

    }


    @Data
    @Accessors(chain = true)
    public static class GenCode {

        @NotNull(message = "设备SN不可为空")
        @ApiModelProperty(value = "设备SN")
        private String deviceSn;


        @NotNull(message = "请输入授权码")
        @ApiModelProperty(value = "授权码")
        private String authCode;

    }
    @Data
    @Accessors(chain = true)
    public static class GenCodeByAdmin {


    }

    @Data
    @Accessors(chain = true)
    public static class VerificationCodeByAdmin {




        @NotNull(message = "授权码不可为空")
        @ApiModelProperty(value = "授权码")
        private String authCode;

    }

    @Data
    @Accessors(chain = true)
    public static class VerificationCode {
        
        @NotNull(message = "设备SN不可为空")
        @ApiModelProperty(value = "设备SN")
        private String deviceSn;


        @NotNull(message = "授权码不可为空")
        @ApiModelProperty(value = "授权码")
        private String authCode;

    }


    @Data
    @Accessors(chain = true)
    public static class Save extends Vo {

    }

    @Data
    @Accessors(chain = true)
    public static class Update extends Vo {

    }

    @Data
    @Accessors(chain = true)
    public static class Vo {

        @ApiModelProperty(value = "id")
        private Long id;

        @ApiModelProperty(value = "设备ID")
        private Long deviceId;

        @ApiModelProperty(value = "商户id")
        private Long mercId;

        @ApiModelProperty(value = "授权码")
        private String authCode;

        @ApiModelProperty(value = "使用时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime useTime;

        @ApiModelProperty(value = "使用人")
        private Long useUser;

        @ApiModelProperty(value = "使用状态")
        private String useStatus;

        @ApiModelProperty(value = "创建人")
        private Long createUser;

        @ApiModelProperty(value = "创建时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime createTime;

        @ApiModelProperty(value = "更新人")
        private Long updateUser;

        @ApiModelProperty(value = "更新时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime updateTime;


    }

}
