package com.yc.ship.module.otc.controller.admin.storetradelog.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
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 StoreTradeLogRespVO {

    @Schema(description = "交易记录ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24548")
    private Long id;

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

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

    @Schema(description = "交易名称", example = "芋艿")
    @ExcelProperty("交易名称")
    private String tradeName;

    @Schema(description = "交易类型：1.管理员余额充值、2.管理员授信充值、3.余额购票、4.授信购票、5.余额退款、6.授信退款", example = "1")
    @ExcelProperty(value = "交易类型", converter = DictConvert.class)
    @DictFormat("trade_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer tradeType;

    @Schema(description = "交易前余额/交易前已用额度")
    @ExcelProperty("交易前余额/交易前已用额度")
    private BigDecimal beforeBalance;

    @Schema(description = "交易后余额/交易后已用额度")
    @ExcelProperty("交易后余额/交易后已用额度")
    private BigDecimal afterBalance;

    @Schema(description = "交易金额")
    @ExcelProperty("交易金额")
    private BigDecimal tradeAmount;

    @Schema(description = "交易类型 1.增加、2.减少")
    @ExcelProperty(value = "交易类型", converter = DictConvert.class)
    @DictFormat("amount_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer tradeMode;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "订单号", example = "31383")
    private String orderId;

    @Schema(description = "订单号", example = "31383")
    @ExcelProperty("订单号")
    private String orderNo;

    @Schema(description = "交易时间")
    @ExcelProperty("交易时间")
    private LocalDateTime createTime;

}
