package com.cf.imes.module.system.controller.admin.funds.purchase.vo;


import com.alibaba.excel.annotation.ExcelProperty;
import com.cf.imes.framework.excel.core.annotations.DictFormat;
import com.cf.imes.framework.excel.core.annotations.EnumFormat;
import com.cf.imes.framework.excel.core.convert.DictConvert;
import com.cf.imes.framework.excel.core.convert.EnumConvert;
import com.cf.imes.module.system.enums.DictTypeConstants;
import com.cf.imes.module.system.enums.pay.InvoiceStatusEnum;
import com.cf.imes.module.system.enums.pay.DurationUnitEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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


@Data
public class PurchaseRecordRespVO {


    @Schema(description = "购买记录ID")
    @ExcelProperty("购买记录编码")
    private Long id;


    @Schema(description = "组织ID")
    @ExcelProperty("组织编号")
    private Long organId;


    @Schema(description = "产品ID")
    @ExcelProperty("产品编号")
    private Long productId;


    @Schema(description = "产品明细ID")
    @ExcelProperty("产品明细编号")
    private Long productDetailsId;


    @Schema(description = "产品名称")
    @ExcelProperty("产品名称")
    private String productName;


    @Schema(description = "购买时长", example = "1")
    @ExcelProperty("购买时长")
    private Integer purchaseDuration;

    @Schema(description = "购买时长单位，0：年、1：月、2：日", example = "1")
    @ExcelProperty(value = "购买时长单位", converter = EnumConvert.class)
    @EnumFormat(value = DurationUnitEnum.class)
    private Integer purchaseDurationUnit;

    @Schema(description = "赠送时长", example = "1")
    @ExcelProperty("赠送时长")
    private Integer giftDuration;

    @Schema(description = "赠送时长单位，0：年、1：月、2：日", example = "1")
    @ExcelProperty(value = "赠送时长单位", converter = EnumConvert.class)
    @EnumFormat(value = DurationUnitEnum.class)
    private Integer giftDurationUnit;

    @Schema(description = "支付方式")
    @ExcelProperty(value = "支付方式", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.PURCHASE_PAYMENT_METHOD)
    private Integer paymentMethod;


    @Schema(description = "订单总额")
    @ExcelProperty("订单总额")
    private BigDecimal totalAmount;


    @Schema(description = "现金余额支出")
    @ExcelProperty("现金余额支出")
    private BigDecimal accountBalanceSpent;


    @Schema(description = "支付宝支出")
    @ExcelProperty("支付宝支出")
    private BigDecimal alipaySpent;


    @Schema(description = "微信支出")
    @ExcelProperty("微信支出")
    private BigDecimal wechatSpent;


    @Schema(description = "赠送金")
    @ExcelProperty("赠送金")
    private BigDecimal giftMoneySpent;

    @Schema(description = "是否开票")
    @ExcelProperty(value = "是否开票", converter = EnumConvert.class)
    @EnumFormat(value = InvoiceStatusEnum.class)
    private Integer isInvocing;

    @Schema(description = "购买时间")
    @ExcelProperty("购买时间")
    private LocalDateTime createTime;

    @Schema(description = "失效时间")
    @ExcelProperty("失效时间")
    private LocalDateTime endTime;

    @Schema(description = "操作人")
    @ExcelProperty("操作人")
    private String creator;


}
