package com.jiayue.ipfcst.common.data.entity.qrtz;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

/**
 * 定时任务实体
 *
 * @author bizy
 * @version 3.0
 */
public class QrtzFiredTriggersEntityPK implements Serializable {
    private String schedName;
    private String entryId;

    @Column(name = "SCHED_NAME")
    @Id
    public String getSchedName() {
        return schedName;
    }

    public void setSchedName(String schedName) {
        this.schedName = schedName;
    }

    @Column(name = "ENTRY_ID")
    @Id
    public String getEntryId() {
        return entryId;
    }

    public void setEntryId(String entryId) {
        this.entryId = entryId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        QrtzFiredTriggersEntityPK that = (QrtzFiredTriggersEntityPK) o;
        return Objects.equals(schedName, that.schedName) &&
                Objects.equals(entryId, that.entryId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(schedName, entryId);
    }
}
