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.
60 lines
1.1 KiB
60 lines
1.1 KiB
6 years ago
|
package db.model;
|
||
6 years ago
|
|
||
|
import javax.persistence.*;
|
||
|
import java.io.Serializable;
|
||
|
import java.util.Objects;
|
||
|
|
||
|
@Entity
|
||
|
@Table(name = "task", schema = "webcrawler", catalog = "")
|
||
|
public class TaskEntity extends AbstractModel {
|
||
|
private int id;
|
||
|
private String api;
|
||
|
|
||
|
@Id
|
||
|
@Column(name = "id")
|
||
|
public int getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public void setId(int id) {
|
||
|
this.id = id;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Basic
|
||
|
@Column(name = "api")
|
||
|
public String getApi() {
|
||
|
return api;
|
||
|
}
|
||
|
|
||
|
public void setApi(String api) {
|
||
|
this.api = api;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public Serializable primaryKey() {
|
||
|
return getId();
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String tableNote() {
|
||
|
return "脚本任务";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object o) {
|
||
|
if (this == o) return true;
|
||
|
if (o == null || getClass() != o.getClass()) return false;
|
||
|
TaskEntity that = (TaskEntity) o;
|
||
|
return id == that.id &&
|
||
|
Objects.equals(api, that.api);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
|
||
|
return Objects.hash(id, api);
|
||
|
}
|
||
|
}
|