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

    @Schema(description = "门店资金卡id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32135")
    private Long id;

    @Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32135")
    private Long storeId;

    @Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "32135")
    @ExcelProperty("门店名称")
    private String storeName;

    @Schema(description = "门店余额")
    @ExcelProperty("门店余额")
    private BigDecimal balance;

    @Schema(description = "启用授信")
    @ExcelProperty(value = "启用授信", converter = DictConvert.class)
    @DictFormat("yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer enableCredit;

    @Schema(description = "授信额度")
    @ExcelProperty("授信额度")
    private BigDecimal credit;

    @Schema(description = "已用额度")
    @ExcelProperty("已用额度")
    private BigDecimal surplus;

    @Schema(description = "平台授信额度")
    @ExcelProperty("平台授信额度")
    private BigDecimal platCredit;

    @Schema(description = "已用平台额度")
    @ExcelProperty("已用平台额度")
    private BigDecimal platSurplus;

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

    @Schema(description = "预付款类型 0 禁用 1共享预付款 2定向预付款")
    private Integer balanceType;

    @Schema(description = "授信类型 0 禁用 1共享授信 2定向授信")
    private Integer creditType;


}
