package com.xy.dto;

import java.time.LocalDateTime;
import java.io.Serializable;
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.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 设备年费订单表
 * </p>
 *
 * @author lijin
 * @since 2025-02-28
 */
public class DeviceAnnualFeeOrdersDto {

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

        @NotBlank(message = "orderId不能为空")
        @ApiModelProperty("订单号")
        private String orderId;

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

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

        @NotNull(message = "size不能为空")
        @ApiModelProperty(value = "购买年数")
        private Integer size;

        @NotNull(message = "money不能为空")
        @ApiModelProperty(value = "金额")
        private Integer money;

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

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

        @NotBlank(message = "orderId不能为空")
        private String orderId;

    }

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

        @NotBlank(message = "code不能为空")
        @ApiModelProperty(value = "商家平台标识", required = true)
        private String code;

    }

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

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

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

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

        @ApiModelProperty(value = "开始时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime beginTime;

        @ApiModelProperty(value = "结束时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime endTime;

    }

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

        private Long id;

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

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

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

        @ApiModelProperty(value = "购买年数")
        private Integer size;

        @ApiModelProperty(value = "金额")
        private Integer money;

        @ApiModelProperty(value = "支付状态")
        private Boolean status;

        @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;


    }

}
