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 谭斌
 * @since 2024-04-07
 */
public class MercFeeConfigAlgorithmTypeDto {

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

    }

    @Data
    @Accessors(chain = true)
    public static class ListByFeeConfigDTO extends Vo {
        @NotNull(message = "mercId不能为空")
        @ApiModelProperty(value = "商户id", required = true)
        private Long mercId;
    }

    @Data
    @Accessors(chain = true)
    public static class SimPayQueryDTO {
        @NotNull(message = "商户id不能为空")
        @ApiModelProperty(value = "商户id")
        private Long mercId;
    }

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

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

    }

    @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 DeviceAlgorithmConfigVO {
        @ApiModelProperty(value = "算法费-平台默认配置")
        private List<DeviceAlgorithmPlatformVO> deviceAcPlatformList;
        @ApiModelProperty(value = "算法费-商家自定义费用")
        private List<DeviceAlgorithmMercVO> deviceAcMercList;
    }

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

        @ApiModelProperty(value = "包月费用，单位 分")
        private Integer moonMoney;
        @ApiModelProperty(value = "包月笔数")
        private Integer moonSize;
        @ApiModelProperty(value = "单笔费用，单位 分")
        private Integer singleMoney;
        @ApiModelProperty(value = "算法类型")
        private Long algorithmId;

    }

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

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

        @ApiModelProperty(value = "商户编码")
        private String mercCode;

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

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

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

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

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

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

        @ApiModelProperty(value = "包月费用(比平台多收的金额)")
        private Integer extraMonthMoney;

        @ApiModelProperty(value = "算法单笔金额(比平台多收的金额)")
        private Integer extraSingleMoney;

        @ApiModelProperty(value = "平台包月费用，单位 分")
        private Integer moonMoney;
        @ApiModelProperty(value = "平台单笔费用，单位 分")
        private Integer singleMoney;
        @ApiModelProperty(value = "包月笔数")
        private Integer moonSize;


    }

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

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

        @ApiModelProperty(value = "商户编码")
        private String mercCode;

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

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

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

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

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

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

        @ApiModelProperty(value = "包月费用(比平台多收的金额)")
        private Integer extraMonthMoney;

        @ApiModelProperty(value = "算法单笔金额(比平台多收的金额)")
        private Integer extraSingleMoney;


    }

}
