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 javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 商户佣金费用结算
 * </p>
 *
 * @author 谭斌
 * @since 2024-04-23
 */
public class MercFeeSettleDto {

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

    }

    @Data
    @Accessors(chain = true)
    public static class Page extends Vo {
        @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;

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

    }

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

        @ApiModelProperty(value = "商户ID", hidden = true)
        private Long mercId;

        @NotNull(message = "结算金额不可为空")
        @ApiModelProperty(value = "结算金额")
        private Integer settleMoney;

        @ApiModelProperty(value = "发票图片（最多支持4个,|分隔）")
        private String titleImg;
    }


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

    }

    @Data
    @Accessors(chain = true)
    public static class DoSettle {
        @NotEmpty(message = "未选择操作对象")
        @ApiModelProperty(value = "ids")
        private List<Long> ids;

    }


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

    }

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

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

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

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

        @ApiModelProperty(value = "结算金额")
        private Integer settleMoney;

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

        @ApiModelProperty(value = "申请人")
        private Long createUser;

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

        @ApiModelProperty(value = "结算状态（1未结算、结算中、2已结算）")
        private Integer settleState;

        @ApiModelProperty(value = "结算完成时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime finishSettleTime;

        @ApiModelProperty(value = "发票图片（最多支持4个,|分隔）")
        private String titleImg;

        @ApiModelProperty(value = "结算人")
        private Long updateUser;


    }

}
