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 QrtzLocksEntityPK implements Serializable {
    private String schedName;
    private String lockName;

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

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

    @Column(name = "LOCK_NAME")
    @Id
    public String getLockName() {
        return lockName;
    }

    public void setLockName(String lockName) {
        this.lockName = lockName;
    }

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

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