package com.codechecker.model; import java.util.Objects; /** * 解析后的单个字段:名称、类型、业务说明(Schema/注释)。 */ public class FieldInfo { private final String name; private final String type; private final String description; public FieldInfo(String name, String type, String description) { this.name = name; this.type = type; this.description = description == null ? "" : description; } /** 字段名 */ public String getName() { return name; } /** 字段类型(简单名) */ public String getType() { return type; } /** 字段说明文案 */ public String getDescription() { return description; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FieldInfo)) { return false; } FieldInfo other = (FieldInfo) o; return Objects.equals(name, other.name) && Objects.equals(type, other.type) && Objects.equals(description, other.description); } @Override public int hashCode() { return Objects.hash(name, type, description); } }