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

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.yc.ship.framework.excel.core.annotations.DictFormat;
import com.yc.ship.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 旅行社账单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class StoreBillRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4341")
    @ExcelProperty("账单号")
    private Long id;

    @Schema(description = "旅行社账单ID")
    @ExcelProperty("主账单号")
    private Long billId;

    @Schema(description = "旅行社名称")
    @ExcelProperty("分销商")
    private String agencyName;

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

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

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

    @Schema(description = "创建时间")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("出账时间")
    private LocalDateTime createTime;

    @Schema(description = "截至支付时间")
    @ExcelProperty("截至支付时间")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payDeadline;

    @Schema(description = "截至未还款（0：不限制，1：限制分销商下单,2:限制门店下单）", example = "1")
    private Integer prohibitType;

    @Schema(description = "账单状态", example = "1")
    @ExcelProperty(value = "账单状态", converter = DictConvert.class)
    @DictFormat("order_bill_status")
    private Integer billStatus;

    @Schema(description = "账单生成类型（1，自动生成，2，手动生成）", example = "1")
    private Integer billBuildType;

    @Schema(description = "账单生成方（1，平台，2，分销商）", example = "1")
    private Integer billGenerator;

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

    @Schema(description = "还款人名称", example = "张三")
    @ExcelProperty("还款人")
    private String payOperatorName;

    @Schema(description = "还款支付金额")
    @ExcelProperty(value = "还款方式", converter = DictConvert.class)
    @DictFormat("payment_type")
    private Integer payType;

    @Schema(description = "已还金额")
    @ExcelProperty("还款金额")
    private BigDecimal payAmount;

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

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

    @Schema(description = "账单类型（1，旅行社账单，2，门店账单）", example = "1")
    private Integer billType;

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

    @Schema(description = "还款人Id", example = "张三")
    private Long payOperatorId;

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

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

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

    @Schema(description = "支付时间")
    @ExcelProperty("还款时间")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payTime;

}