package com.yc.ship.module.resource.controller.admin.machine.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.time.LocalDateTime;

@Schema(description = "管理后台 - 设备 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ScenicMachineRespVO {

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

    @Schema(description = "名称", example = "李四")
    @ExcelProperty("名称")
    private String name;

    @Schema(description = "通道ID", example = "4656")
    private Long channelId;

    @Schema(description = "通道名称", example = "4656")
    @ExcelProperty("通道名称")
    private String channelName;

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

    @Schema(description = "设备状态", example = "1")
    @ExcelProperty(value = "设备状态", converter = DictConvert.class)
    @DictFormat("machine_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer machineStatus;

    @Schema(description = "设备ID", example = "13048")
    @ExcelProperty("设备编码")
    private String machineId;

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

    @Schema(description = "排序")
    @ExcelProperty("排序")
    private Integer sortNum;

    @Schema(description = "终端号")
    @ExcelProperty("终端号")
    private String payTerminalCode;

    @Schema(description = "序列号")
    @ExcelProperty("序列号")
    private String paySerialNum;

    @Schema(description = "序列号密文数据")
    @ExcelProperty("序列号密文数据")
    private String paySecretText;

    @Schema(description = "应用程序版本号")
    @ExcelProperty("应用程序版本号")
    private String payAppVersion;

    @Schema(description = "经度")
    @ExcelProperty("经度")
    private String payLongitude;

    @Schema(description = "纬度")
    @ExcelProperty("纬度")
    private String payLatitude;

    @Schema(description = "pos终端号")
    @ExcelProperty("pos终端号")
    private String posNo;

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

    @Schema(description = "站点Id", example = "6586")
    private Long siteId;

    @Schema(description = "站点名称", example = "6586")
    @ExcelProperty("站点名称")
    private String siteName;

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

    /**
     * 是否可以编辑
     */
    @Schema(description = "是否可以编辑")
    private Integer isModify;
}
