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

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30033")
    @ExcelProperty("主键ID")
    private Long id;

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

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

    @Schema(description = "操作类型 1.余额，2.授信充正，3.授信提额", example = "1")
    @ExcelProperty(value = "操作类型 1.余额，2.授信充正，3.授信提额", converter = DictConvert.class)
    @DictFormat("otc_audit_operate_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer operateType;

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

    @Schema(description = "金额（提升额度/充值额度）")
    @ExcelProperty("金额（提升额度/充值额度）")
    private BigDecimal amount;

    @Schema(description = "申请人")
    @ExcelProperty("申请人")
    private Long applyUser;

    @Schema(description = "申请用户名", example = "王五")
    @ExcelProperty("申请用户名")
    private String applyUserName;

    @Schema(description = "申请时间")
    @ExcelProperty("申请时间")
    private LocalDateTime applyTime;

    @Schema(description = "状态 0.申请中，1.审核通过，2.审核驳回", example = "1")
    @ExcelProperty(value = "状态 0.申请中，1.审核通过，2.审核驳回", converter = DictConvert.class)
    @DictFormat("audit_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "审核人")
    @ExcelProperty("审核人")
    private Long auditUser;

    @Schema(description = "审核用户名", example = "李四")
    @ExcelProperty("审核用户名")
    private String auditUserName;

    @Schema(description = "审核时间")
    @ExcelProperty("审核时间")
    private LocalDateTime auditTime;

    @Schema(description = "充值备注", example = "随便")
    @ExcelProperty("充值备注")
    private String applyRemark;

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

    @Schema(description = "流水号")
    @ExcelProperty("流水号")
    private String serialNum;

    @Schema(description = "充值单号ID", example = "11360")
    @ExcelProperty("充值单号ID")
    private String rechargeLogId;

    @Schema(description = "附件地址", example = "https://www.iocoder.cn")
    @ExcelProperty("附件地址")
    private String fileUrl;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
