147 lines
4.8 KiB
Java
147 lines
4.8 KiB
Java
package model;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.google.gson.annotations.SerializedName;
|
|
|
|
import java.util.Objects;
|
|
|
|
/** Объект тикета (POJO) */
|
|
public class Ticket {
|
|
|
|
@SerializedName("id")
|
|
private Integer id;
|
|
|
|
@JsonIgnore
|
|
@SerializedName("due_date")
|
|
private String due_date;
|
|
|
|
@SerializedName("assigned_to")
|
|
private String assigned_to;
|
|
|
|
@SerializedName("title")
|
|
private String title;
|
|
|
|
@JsonIgnore
|
|
@SerializedName("created")
|
|
private String created;
|
|
|
|
@JsonIgnore
|
|
@SerializedName("modified")
|
|
private String modified;
|
|
|
|
@SerializedName("submitter_email")
|
|
private String submitter_email;
|
|
|
|
@SerializedName("status")
|
|
private Integer status;
|
|
|
|
@SerializedName("on_hold")
|
|
private Boolean on_hold;
|
|
|
|
@SerializedName("description")
|
|
private String description;
|
|
|
|
@SerializedName("resolution")
|
|
private String resolution;
|
|
|
|
@SerializedName("priority")
|
|
private Integer priority;
|
|
|
|
@SerializedName("last_escalation")
|
|
private String last_escalation;
|
|
|
|
@SerializedName("secret_key")
|
|
private String secret_key;
|
|
|
|
@SerializedName("queue")
|
|
private Integer queue;
|
|
|
|
@SerializedName("kbitem")
|
|
private Integer kbitem;
|
|
|
|
@SerializedName("merged_to")
|
|
private Integer merged_to;
|
|
|
|
public void setId(Integer id) { this.id = id; }
|
|
public Integer getId() { return id; }
|
|
|
|
public void setDue_date(String due_date) { this.due_date = due_date; }
|
|
public String getDue_date() { return due_date; }
|
|
|
|
public void setAssigned_to(String assigned_to) { this.assigned_to = assigned_to; }
|
|
public String getAssigned_to() { return assigned_to; }
|
|
|
|
public void setTitle(String title) { this.title = title; }
|
|
public String getTitle() { return title; }
|
|
|
|
public void setCreated(String created) { this.created = created; }
|
|
public String getCreated() { return created; }
|
|
|
|
public void setModified(String modified) { this.modified = modified; }
|
|
public String getModified() { return modified; }
|
|
|
|
public void setSubmitter_email(String submitter_email) { this.submitter_email = submitter_email; }
|
|
public String getSubmitter_email() { return submitter_email; }
|
|
|
|
public void setStatus(Integer status) { this.status = status; }
|
|
public Integer getStatus() { return status; }
|
|
|
|
public void setOn_hold(boolean on_hold) { this.on_hold = on_hold; }
|
|
public boolean isOn_hold() { return on_hold; }
|
|
|
|
public void setDescription(String description) { this.description = description; }
|
|
public String getDescription() { return description; }
|
|
|
|
public void setResolution(String resolution) { this.resolution = resolution; }
|
|
public String getResolution() { return resolution; }
|
|
|
|
public void setPriority(Integer priority) { this.priority = priority; }
|
|
public Integer getPriority() { return priority; }
|
|
|
|
public void setLast_escalation(String last_escalation) { this.last_escalation = last_escalation; }
|
|
public String getLast_escalation() { return last_escalation; }
|
|
|
|
public void setSecret_key(String secret_key) { this.secret_key = secret_key; }
|
|
public String getSecret_key() { return secret_key; }
|
|
|
|
public void setQueue(Integer queue) { this.queue = queue; }
|
|
public Integer getQueue() { return queue; }
|
|
|
|
public void setKbitem(Integer kbitem) { this.kbitem = kbitem; }
|
|
public Integer getKbitem() { return kbitem; }
|
|
|
|
public void setMerged_to(Integer merged_to) { this.merged_to = merged_to; }
|
|
public Integer getMerged_to() { return merged_to; }
|
|
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) return true;
|
|
if (getClass() != o.getClass()) return false;
|
|
|
|
Ticket other = (Ticket) o;
|
|
|
|
return Objects.equals(due_date, other.due_date) &&
|
|
Objects.equals(assigned_to, other.assigned_to) &&
|
|
Objects.equals(title, other.title) &&
|
|
Objects.equals(submitter_email, other.submitter_email) &&
|
|
Objects.equals(status, other.status) &&
|
|
Objects.equals(on_hold, other.on_hold) &&
|
|
Objects.equals(description, other.description) &&
|
|
Objects.equals(resolution, other.resolution) &&
|
|
Objects.equals(priority, other.priority) &&
|
|
Objects.equals(last_escalation, other.last_escalation) &&
|
|
Objects.equals(secret_key, other.secret_key) &&
|
|
Objects.equals(queue, other.queue) &&
|
|
Objects.equals(kbitem, other.kbitem) &&
|
|
Objects.equals(merged_to, other.merged_to);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(due_date, assigned_to, title,
|
|
submitter_email, status, on_hold, description, resolution,
|
|
priority, last_escalation, secret_key, queue, kbitem, merged_to);
|
|
}
|
|
}
|