package com.yc.ship.module.trade.controller.admin.bill.vo;

import com.yc.ship.module.trade.api.dto.TradeOrderRespDTO;
import com.yc.ship.module.trade.controller.admin.order.vo.order.TradeOrderRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import static com.yc.ship.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;


@Schema(description = "管理后台 - 旅行社账单新增/修改 Request VO")
@Data
public class BillSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4341")
    private Long id;
    @Schema(description = "截至未还款（0：不限制，1：限制分销商下单,2:限制门店下单）", example = "1")
    private Integer type;

    @Schema(description = "账单订单开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime orderStratTime;

    @Schema(description = "账单订单结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime orderEndTime;

    @Schema(description = "账单状态", example = "1")
    private Integer billStatus;

    @Schema(description = "账单订单数")
    private Integer orderNum;

    @Schema(description = "操作人ID", example = "25672")
    private Long operatorId;

    @Schema(description = "操作人", example = "张三")
    private String operatorName;

    @Schema(description = "门店ID", example = "8584")
    private Long storeId;

    @Schema(description = "门店名称", example = "芋艿")
    private String storeName;

    @Schema(description = "旅行社ID", example = "8584")
    private Long distributorId;

    @Schema(description = "旅行社ID", example = "8584")
    private Long agencyId;

    @Schema(description = "旅行社名称", example = "芋艿")
    private String agencyName;

    @Schema(description = "订单集合")
    private List<TradeOrderRespVO> orders;

    @Schema(description = "订单总金额")
    private BigDecimal sellAmount;

    @Schema(description = "授信账单金额")
    private BigDecimal creditPay;

    @Schema(description = "截至支付时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime payDeadline;

    @Schema(description = "账单支付时间")
    private LocalDateTime payTime;
}