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 java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 设备计费历史表
 * </p>
 *
 * @author lijin
 * @since 2023-04-14
 */
public class DeviceChargingHistoryDto {

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

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

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

        @ApiModelProperty(value = "订单id")
        private String orderId;

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

        @ApiModelProperty(value = "续费金额")
        private Integer chargingMoney;

        @ApiModelProperty(value = "续费数量")
        private Integer chargingSize;

        @ApiModelProperty(value = "续费方式")
        private Integer chargingType;

        @ApiModelProperty(value = "状态")
        private Integer status;

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

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

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

        @ApiModelProperty(value = "附件")
        private String files;

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

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

        @ApiModelProperty("分页对象")
        private PageBean page;

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

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

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

        @ApiModelProperty(value = "商户id")
        private List<Long> mercIds;

        @ApiModelProperty(value = "统计时间-起 yyyy-MM")
        private String beginDate;

        @ApiModelProperty(value = "统计时间-始 yyyy-MM")
        private String endDate;
    }

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

        @ApiModelProperty(value = "统计时间 yyyy-MM")
        private String date;

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

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

        @ApiModelProperty(value = "设备数")
        private Integer deviceSize;

        @ApiModelProperty(value = "续费金额")
        private Integer chargingMoney;
    }

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

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

        @ApiModelProperty(value = "商户id")
        private List<Long> mercIds;

        @ApiModelProperty(value = "统计时间-起 yyyy-MM-dd")
        private String beginDate;

        @ApiModelProperty(value = "统计时间-始 yyyy-MM-dd")
        private String endDate;
    }

}
