package com.xy.dto;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

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

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 管理员设备激活记录表
 * </p>
 *
 * @author lijin
 * @since 2023-11-17
 */
public class DeviceAdminActivateDto {

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

        @NotEmpty(message = "deviceId不能为空")
        @ApiModelProperty(value = "设备id", required = true)
        private List<Long> deviceId;

        @NotNull(message = "deviceChargingDay不能为空")
        @ApiModelProperty(value = "管理费天数", required = true)
        private Integer deviceChargingDay;

        @NotNull(message = "algorithmId不能为空")
        @ApiModelProperty(value = "算法id", required = true)
        private Long algorithmId;

        @NotNull(message = "deviceAlgorithmChargingSize不能为空")
        @ApiModelProperty(value = "卡包条数", required = true)
        private Integer deviceAlgorithmChargingSize;

        @ApiModelProperty(value = "批次号")
        private String batchNo;

        @ApiModelProperty(value = "备注")
        private String note;

        @ApiModelProperty(value = "附件地址")
        private String filePath;

    }

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

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

    }

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

        private Long id;

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

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

        @ApiModelProperty(value = "设备类型")
        private Integer deviceType;

        @ApiModelProperty(value = "批次号")
        private String batchNo;

        @ApiModelProperty(value = "备注")
        private String note;

        @ApiModelProperty(value = "附件地址")
        private String filePath;

        @ApiModelProperty(value = "操作人")
        private Long createUser;

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

        @ApiModelProperty(value = "商户名称")
        private String mercName;

        @ApiModelProperty(value = "操作人名称")
        private Long createUserName;
    }

}
