package cn.iocoder.yudao.module.iot.controller.admin.frps.vo;

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

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 代理服务器 Response VO")
@Data
@ExcelIgnoreUnannotated
public class FrpsServerRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18589")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "名称", example = "芋艿")
    @ExcelProperty("名称")
    private String frpsName;

    @Schema(description = "mac地址")
    @ExcelProperty("mac地址")
    private String hostMac;

    @Schema(description = "操作系统")
    @ExcelProperty("操作系统")
    private String hostOs;

    @Schema(description = "服务IP")
    @ExcelProperty("服务IP")
    private String hostIp;

    @Schema(description = "服务端口")
    @ExcelProperty("服务端口")
    private Integer hostPort;

    @Schema(description = "程序绝对路径")
    @ExcelProperty("程序绝对路径")
    private String frpsPath;

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

    @Schema(description = "备注", example = "随便")
    @ExcelProperty("备注")
    private String remark;

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

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}