package com.yc.ship.module.ota.controller.admin.distributor.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;
import java.util.List;

@Schema(description = "管理后台 - 分销商信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DistributorRespVO {

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

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

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

    @Schema(description = "结算方式")
    private List<String> payType;

    @Schema(description = "经销类型", example = "2")
    @ExcelProperty(value = "经销类型", converter = DictConvert.class)
    @DictFormat("distributor_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer type;

    @Schema(description = "分销商类型", example = "23448")
    @ExcelProperty("分销商类型")
    private Long otaTypeId;

    @Schema(description = "分销商等级", example = "23448")
    @ExcelProperty("分销商等级")
    private Long otcLevelId;

    @Schema(description = "分销商分组", example = "23448")
    @ExcelProperty("分销商分组")
    private Long otaCategoryId;

    @Schema(description = "全称", example = "王五")
    @ExcelProperty("全称")
    private String name;

    @Schema(description = "简称", example = "张三")
    @ExcelProperty("简称")
    private String shortName;

    @Schema(description = "编码", example = "张三")
    @ExcelProperty("编码")
    private String code;

    @Schema(description = "登录名", example = "王五")
    private String loginName;

    @Schema(description = "登录密码")
    private String password;

    @Schema(description = "联系人")
    @ExcelProperty("联系人")
    private String contactPerson;

    @Schema(description = "联系电话")
    @ExcelProperty("联系电话")
    private String contactPhone;

    @Schema(description = "开始使用时间")
    @ExcelProperty("开始使用时间")
    private LocalDateTime startTime;

    @Schema(description = "结束使用时间")
    @ExcelProperty("结束使用时间")
    private LocalDateTime stopTime;

    @Schema(description = "是否自营")
    @ExcelProperty(value = "是否自营", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer selfSupport;

    @Schema(description = "功能")
    private List<String> functions;

    @Schema(description = "团队类型", example = "2")
    private List<String> teamType;

    @Schema(description = "是否为挂靠旅行社")
    private Integer isAttachment;

    @Schema(description = "被挂靠旅行社")
    private String attachmentedAgency;

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

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

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

    @Schema(description = "定向库存余额")
    private BigDecimal inventory;

    @Schema(description = "是否开启退票审核")
    private Integer canRefundExamine;

    @Schema(description = "下单支付超时时间")
    private Integer payTimeOut;

    @Schema(description = "AppId")
    private String appid;

    @Schema(description = "Secret")
    private String secret;

    @Schema(description = "服务地址")
    private String serverUrl;

    @Schema(description = "分销商IP")
    private String otaIp;
    @Schema(description = "分销商账号")
    private String otaAccount;
    @Schema(description = "登录账户所在租户号")
    private Long accountTenantId;
    @Schema(description = "分销商产品id")
    private Long distributorProductId;

    @Schema(description = "登录账户所在（0：平台 1：旅行社  2:门店）")
    private Integer channel;

    @Schema(description = "单位地址")
    private String unitAddress;
    @Schema(description = "开户银行")
    private String depositBank;
    @Schema(description = "银行账户")
    private String bankAccount;
    @Schema(description = "税号")
    private String accountNumber;
    @Schema(description = "电话")
    private String phone;
    @Schema(description = "邮箱")
    private String email;
    @Schema(description = "是否可选")
    private Boolean disabled;
    @Schema(description = "租户id")
    private Long tenantId;
    @Schema(description = "招行短号")
    private String cmbShortNo;

    @Schema(description = "预付款累计")
    private BigDecimal balanceTotal;

    @Schema(description = "授信额度累计")
    private BigDecimal payCreditTotal;

    @Schema(description = "分销商商户id")
    private String externalAccountId;
    @Schema(description = "分销商门店id")
    private String externalPoiIds;
    @Schema(description = "分销商编码-OA")
    private String custCode;
    @Schema(description = "分销商区域代理")
    private String regionAgency;

}