You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
1.9 KiB
84 lines
1.9 KiB
7 years ago
|
package org.pqh.model;
|
||
|
|
||
|
import javax.persistence.Basic;
|
||
|
import javax.persistence.Column;
|
||
|
import javax.persistence.Entity;
|
||
|
import javax.persistence.Id;
|
||
|
import java.io.Serializable;
|
||
|
|
||
|
/**
|
||
|
* Created by reborn on 2017/7/31.
|
||
|
*/
|
||
|
@Entity
|
||
|
public class Param extends AbstractModel{
|
||
|
private String key;
|
||
|
private String value;
|
||
|
private String desc;
|
||
|
|
||
|
@Id
|
||
|
@Column(name = "`key`")
|
||
|
public String getKey() {
|
||
|
return key;
|
||
|
}
|
||
|
|
||
|
public void setKey(String key) {
|
||
|
this.key = key;
|
||
|
}
|
||
|
|
||
|
@Basic
|
||
|
@Column(name = "value")
|
||
|
public String getValue() {
|
||
|
return value;
|
||
|
}
|
||
|
|
||
|
public void setValue(String value) {
|
||
|
this.value = value;
|
||
|
}
|
||
|
|
||
|
@Basic
|
||
|
@Column(name = "`desc`")
|
||
|
public String getDesc() {
|
||
|
return desc;
|
||
|
}
|
||
|
|
||
|
public void setDesc(String desc) {
|
||
|
this.desc = desc;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object o) {
|
||
|
if (this == o) return true;
|
||
|
if (o == null || getClass() != o.getClass()) return false;
|
||
|
|
||
|
Param param = (Param) o;
|
||
|
|
||
|
if (key != null ? !key.equals(param.key) : param.key != null) return false;
|
||
|
if (value != null ? !value.equals(param.value) : param.value != null) return false;
|
||
|
if (desc != null ? !desc.equals(param.desc) : param.desc != null) return false;
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
int result = key != null ? key.hashCode() : 0;
|
||
|
result = 31 * result + (value != null ? value.hashCode() : 0);
|
||
|
result = 31 * result + (desc != null ? desc.hashCode() : 0);
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
return "Param{" +
|
||
|
"key='" + key + '\'' +
|
||
|
", value='" + value + '\'' +
|
||
|
", desc='" + desc + '\'' +
|
||
|
'}';
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Serializable primaryKey() {
|
||
|
return getKey();
|
||
|
}
|
||
|
}
|