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.
107 lines
2.5 KiB
107 lines
2.5 KiB
package db.model.bilibili;
|
|
|
|
import db.annotation.Aliyun;
|
|
import db.model.AbstractModel;
|
|
|
|
import javax.persistence.*;
|
|
import java.io.Serializable;
|
|
import java.sql.Timestamp;
|
|
import java.util.Objects;
|
|
|
|
@Entity
|
|
@Table(name = "scheduled_task")
|
|
@Aliyun
|
|
public class ScheduledTaskEntity extends AbstractModel {
|
|
private int id;
|
|
private String description;
|
|
private String expression;
|
|
private Timestamp nextRuntime;
|
|
private Timestamp lastRuntime;
|
|
private String lastReturnMsg;
|
|
|
|
|
|
@Id
|
|
@Column(name = "id")
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(int id) {
|
|
this.id = id;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "description")
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "expression")
|
|
public String getExpression() {
|
|
return expression;
|
|
}
|
|
|
|
public void setExpression(String expression) {
|
|
this.expression = expression;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "next_runtime")
|
|
public Timestamp getNextRuntime() {
|
|
return nextRuntime;
|
|
}
|
|
|
|
public void setNextRuntime(Timestamp nextRuntime) {
|
|
this.nextRuntime = nextRuntime;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "last_runtime")
|
|
public Timestamp getLastRuntime() {
|
|
return lastRuntime;
|
|
}
|
|
|
|
public void setLastRuntime(Timestamp lastRuntime) {
|
|
this.lastRuntime = lastRuntime;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "last_return_msg")
|
|
public String getLastReturnMsg() {
|
|
return lastReturnMsg;
|
|
}
|
|
|
|
public void setLastReturnMsg(String lastReturnMsg) {
|
|
this.lastReturnMsg = lastReturnMsg;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) return true;
|
|
if (o == null || getClass() != o.getClass()) return false;
|
|
ScheduledTaskEntity that = (ScheduledTaskEntity) o;
|
|
return id == that.id &&
|
|
Objects.equals(description, that.description) &&
|
|
Objects.equals(expression, that.expression) &&
|
|
Objects.equals(nextRuntime, that.nextRuntime) &&
|
|
Objects.equals(lastRuntime, that.lastRuntime) &&
|
|
Objects.equals(lastReturnMsg, that.lastReturnMsg);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
|
|
return Objects.hash(id, description, expression, nextRuntime, lastRuntime, lastReturnMsg);
|
|
}
|
|
|
|
@Override
|
|
public Serializable primaryKey() {
|
|
return getId();
|
|
}
|
|
|
|
}
|
|
|