package com.sf.service.gateway.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sf.common.annotation.Excel;
import com.sf.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 服务管理对象 Gateway_server
 * 
 * @author zoukun
 * @date 2024-04-22
 */
@Data
public class GatewayServer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 服务名称 */
    @Excel(name = "服务名称")
    @NotBlank(message = "服务名称不能为空")
    @Pattern(regexp = "^[a-zA-Z_]\\w{0,49}$",message = "服务名只能以字母或下划线开头，只能包含字母、数字、下划线，不超过50个字符")
    private String serverName;

    /** 服务地址 */
    @Excel(name = "服务地址")
    private String serverAddress;

    /** 服务状态 */
    @Excel(name = "服务状态")
    private String status;

    @ApiModelProperty("应用编号")
    private String appCode;

    @ApiModelProperty("创建者")
    private String created;

    @ApiModelProperty("更新者")
    private String modified;

    @ApiModelProperty("服务模式（NORMAL=普通模式，ROUTE=路由模式）")
    private String serviceModel;

    @ApiModelProperty("路由规则id")
    private Long routeId;

}
