package cn.iocoder.yudao.module.iot.controller.admin.frpc.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 FrpcProxyServerRespVO {

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

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

    @Schema(description = "内网IP")
    @ExcelProperty("内网IP")
    private String localIp;

    @Schema(description = "内网端口")
    @ExcelProperty("内网端口")
    private Integer localPort;

    @Schema(description = "访问后缀")
    @ExcelProperty("访问后缀")
    private String suffixPath;

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

    @Schema(description = "代理服务器", example = "30251")
    @ExcelProperty("代理服务器")
    private Long frpsId;

    @Schema(description = "代理端口")
    @ExcelProperty("代理端口")
    private Integer proxyPort;

    @Schema(description = "代理地址")
    @ExcelProperty("代理地址")
    private String proxyAddress;

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

    @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;

}