package com.yc.ship.module.ota.controller.admin.distributorauditlog.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 DistributorAuditLogRespVO {

    @Schema(description = "额度变更ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24609")
    @ExcelProperty("额度变更ID")
    private Long id;

    @Schema(description = "分销商ID", example = "29860")
//    @ExcelProperty("分销商ID")
    private Long distributorId;

    @Schema(description = "分销商名称", example = "29860")
    @ExcelProperty("分销商名称")
    private String distributorName;

    @Schema(description = "变更额度名称", example = "芋艿")
    @ExcelProperty("变更额度名称")
    private String creditName;

    @Schema(description = "变更前额度")
    @ExcelProperty("变更前额度")
    private BigDecimal beforeCredit;

    @Schema(description = "变更后额度")
    @ExcelProperty("变更后额度")
    private BigDecimal afterCredit;

    @Schema(description = "变更金额")
    @ExcelProperty("变更金额")
    private BigDecimal creditAmount;

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

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

    @Schema(description = "额度变更时间")
    @ExcelProperty("额度变更时间")
    private LocalDateTime createTime;

}
