package com.yc.ship.module.otc.controller.admin.storecreditlog.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 StoreCreditLogRespVO {

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

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

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

    @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;

}
