package cn.iocoder.yudao.module.safe.controller.admin.server.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "用户 APP - 安防后端设备 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppSafeServerRespVO {

    @Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9770")
    @ExcelProperty("设备ID")
    private Long id;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("名称")
    private String name;

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

    @Schema(description = "品牌")
    @ExcelProperty("品牌")
    private String brand;

    @Schema(description = "型号")
    @ExcelProperty("型号")
    private String model;

    @Schema(description = "所属机构")
    @ExcelProperty("所属机构")
    private Long orgId;

    @Schema(description = "接入协议", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "接入协议", converter = DictConvert.class)
    @DictFormat("safe_device_protocol") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String protocol;

    @Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("地址")
    private String ip;

    @Schema(description = "端口", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("端口")
    private Integer port;

    @Schema(description = "服务域", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("服务域")
    private String domain;

    @Schema(description = "用户名")
    @ExcelProperty("用户名")
    private String username;

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

    @Schema(description = "描述")
    @ExcelProperty("描述")
    private String desc;

}
