ConfigurationManage.java 2.44 KB
package com.hongxinhui.entity;

import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.geekidea.springbootplus.framework.common.enums.BaseEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;

/**
 * 配置管理表
 *
 * @author cyz
 * @since 2022-02-14
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ConfigurationManage对象")
public class ConfigurationManage extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "id不能为空", groups = {Update.class})
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("铁路名称")
    @TableField("railwayName")
    private String railwayName;

    @ApiModelProperty("起点名称")
    @TableField("startName")
    private String startName;

    @ApiModelProperty("终点名称")
    @TableField("endName")
    private String endName;

    @ApiModelProperty("长度")
    @TableField("totalLength")
    private Double totalLength;

    @ApiModelProperty("配置类型1铁路线2站点3FSU4监测设备5漏缆6天馈线")
    @TableField("connectionType")
    private Integer connectionType;


    public enum FieldEnum implements BaseEnum {

        railwayName("railwayName", "铁路名称"),
        startName("startName", "起点名称"),
        endName("endName", "终点名称"),
        totalLength("totalLength", "长度"),
        connectionType("connectionType", "配置类型1铁路线2站点3FSU4监测设备5漏缆6天馈线"),
        id("id", "编号");

        /**
         * name
         */
        @Getter
        private final String name;

        /**
         * desc
         */
        @Getter
        private final String desc;

        FieldEnum(String name, String desc) {
            this.name = name;
            this.desc = desc;
        }

        @Override
        public Integer getCode() {
            return null;
        }

    }

}