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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.net.URL;

/**
 * @author: 默苍璃
 * @date: 2025-06-0618:16
 */
@Data
@HeadRowHeight(20)  // 表头行高
@ContentRowHeight(100)  // 内容行高
public class DeviceExcelExportDTO {

    @ExcelProperty("ID")
    private Long id;

    @ExcelProperty("设备类型")
    private Long deviceType;

    // @ExcelProperty("客户号")
    // private Long customerId;

    @ExcelProperty("所属客户")
    private String customerName;

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

    @ExcelProperty(value = "设备图片", converter = IgnoreFailedImageConverter.class)
    @ColumnWidth(15)  // 设置图片列宽度
    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("经度")
    private String longitude;

    @ExcelProperty("纬度")
    private String latitude;

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

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

    /**
     * 设备状态
     * 0 失效
     * 1 正常
     */
    @ExcelProperty("设备状态")
    @ColumnWidth(20)
    private String deviceStatus;

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

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

}
