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

import javax.persistence.*;
import java.util.Objects;

/**
 * 定时任务实体
 *
 * @author bizy
 * @version 3.0
 */
@Entity
@Table(name = "qrtz_paused_trigger_grps", catalog = "")
@IdClass(QrtzPausedTriggerGrpsEntityPK.class)
public class QrtzPausedTriggerGrpsEntity {
    private String schedName;
    private String triggerGroup;

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

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

    @Id
    @Column(name = "TRIGGER_GROUP")
    public String getTriggerGroup() {
        return triggerGroup;
    }

    public void setTriggerGroup(String triggerGroup) {
        this.triggerGroup = triggerGroup;
    }

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

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