package com.fuyuanshen.equipment.domain.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fuyuanshen.equipment.converter.IgnoreFailedImageConverter;
import lombok.Data;

import java.net.URL;

/**
 * 设备及完整类型信息导出DTO
 *
 * @author: 默苍璃
 * @date: 2025-11-04 16:25
 */
@Data
@HeadRowHeight(20)  // 表头行高
@ContentRowHeight(100)  // 内容行高
public class DeviceWithTypeExcelExportDTO {

    @ExcelProperty("设备名称")
    @ColumnWidth(20)
    private String deviceName;

    @ExcelProperty("设备类型名称")
    @ColumnWidth(20)
    private String typeName;

    @ExcelProperty(value = "设备图片", converter = IgnoreFailedImageConverter.class)
    // @ExcelProperty(value = "设备图片")
    @ColumnWidth(30)  // 设置图片列宽度
    private URL devicePic;  // 使用URL类型

    @ExcelProperty("设备MAC")
    @ColumnWidth(20)
    private String deviceMac;

    @ExcelProperty("蓝牙名称")
    @ColumnWidth(20)
    private String bluetoothName;

    @ExcelProperty("设备IMEI")
    @ColumnWidth(20)
    private String deviceImei;

    @ExcelProperty("备注")
    @ColumnWidth(30)
    private String remark;

    /**
     * 绑定状态
     * 0 未绑定
     * 1 已绑定
     */
    @ExcelProperty("绑定状态")
    @ColumnWidth(20)
    private String bindingStatus;

    @ExcelProperty("创建时间")
    @ColumnWidth(20)
    private String createTime;

    @ExcelProperty("创建人")
    @ColumnWidth(20)
    private String createBy;

    /*
     *设备类型数据
     */
    @ExcelProperty("是否支持蓝牙")
    @ColumnWidth(15)
    private String isSupportBle;

    @ExcelProperty("定位方式")
    @ColumnWidth(20)
    private String locateMode;

    @ExcelProperty("通讯方式")
    @ColumnWidth(20)
    private String communicationMode;

    /**
     * 型号字典用于APP页面跳转
     * app_model_dictionary
     */
    @ExcelProperty("型号字典用于APP页面跳转")
    @ColumnWidth(20)
    private String appModelDictionary;

    /**
     * 型号字典用于PC页面跳转
     * pc_model_dictionary
     */
    @ExcelProperty("型号字典用于PC页面跳转")
    @ColumnWidth(20)
    private String pcModelDictionary;

}