package com.xy.dto;

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

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

/**
 * <p>
 * 设备类型算法预充配置
 * </p>
 *
 * @author lijin
 * @since 2023-07-10
 */
public class DeviceTypeAlgorithmBeforConfigDto {

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

    }

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

        @NotNull(message = "mercId不能为空")
        @ApiModelProperty(value = "商户id")
        private Long mercId;

        @NotNull(message = "deviceType不能为空")
        @ApiModelProperty(value = "设备类型")
        private Integer deviceType;

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

        @NotNull(message = "money不能为空")
        @ApiModelProperty(value = "预充金额;单位：分")
        private Integer money;
    }

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

        @NotNull(message = "id不能为空")
        @ApiModelProperty(value = "id")
        private Long id;

        @NotNull(message = "money不能为空")
        @ApiModelProperty(value = "预充金额;单位：分")
        private Integer money;
    }

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

        @NotNull(message = "id不能为空")
        @ApiModelProperty(value = "id")
        private Long id;
    }

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

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

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

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

        @ApiModelProperty(value = "算法id")
        private Long algorithmId;

        @ApiModelProperty(value = "预充金额;单位：分")
        private Integer money;

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

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


    }

}
