优化checks

This commit is contained in:
none
2023-03-09 12:00:24 +08:00
parent b0d43447c6
commit 82f0783cb8
11 changed files with 413 additions and 95 deletions

View File

@@ -0,0 +1,166 @@
package xyz.playedu.api.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* @TableName app_config
*/
@TableName(value = "app_config")
@Data
public class AppConfig implements Serializable {
/**
*
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 分组
*/
private String group;
/**
* 名称
*/
private String name;
/**
* 升序
*/
private Integer sort;
/**
*
*/
@JsonProperty("field_type")
private String fieldType;
/**
* 键
*/
private String key;
/**
* 值
*/
private String value;
/**
* 默认值
*/
@JsonProperty("default_value")
private String defaultValue;
/**
* 可选值
*/
@JsonProperty("option_value")
private String optionValue;
/**
* 是否私密信息
*/
@JsonProperty("is_private")
private Integer isPrivate;
/**
* 帮助信息
*/
private String help;
/**
*
*/
@JsonIgnore
private Date createdAt;
/**
* 1显示,0否
*/
@JsonIgnore
private Integer isShow;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
AppConfig other = (AppConfig) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGroup() == null ? other.getGroup() == null : this.getGroup().equals(other.getGroup()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getFieldType() == null ? other.getFieldType() == null : this.getFieldType().equals(other.getFieldType()))
&& (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey()))
&& (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
&& (this.getDefaultValue() == null ? other.getDefaultValue() == null : this.getDefaultValue().equals(other.getDefaultValue()))
&& (this.getOptionValue() == null ? other.getOptionValue() == null : this.getOptionValue().equals(other.getOptionValue()))
&& (this.getIsPrivate() == null ? other.getIsPrivate() == null : this.getIsPrivate().equals(other.getIsPrivate()))
&& (this.getHelp() == null ? other.getHelp() == null : this.getHelp().equals(other.getHelp()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getIsShow() == null ? other.getIsShow() == null : this.getIsShow().equals(other.getIsShow()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGroup() == null) ? 0 : getGroup().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
result = prime * result + ((getFieldType() == null) ? 0 : getFieldType().hashCode());
result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode());
result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
result = prime * result + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode());
result = prime * result + ((getOptionValue() == null) ? 0 : getOptionValue().hashCode());
result = prime * result + ((getIsPrivate() == null) ? 0 : getIsPrivate().hashCode());
result = prime * result + ((getHelp() == null) ? 0 : getHelp().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getIsShow() == null) ? 0 : getIsShow().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", group=").append(group);
sb.append(", name=").append(name);
sb.append(", sort=").append(sort);
sb.append(", fieldType=").append(fieldType);
sb.append(", key=").append(key);
sb.append(", value=").append(value);
sb.append(", defaultValue=").append(defaultValue);
sb.append(", optionValue=").append(optionValue);
sb.append(", isPrivate=").append(isPrivate);
sb.append(", help=").append(help);
sb.append(", createdAt=").append(createdAt);
sb.append(", isShow=").append(isShow);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}