package com.hzu.labbooking.domain.component;

import lombok.Data;

/**
 * @author: skyed
 * @date: 2021-4-29
 */
@Data
public class MapKey {

    private long day;
    private long time;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        //if (!super.equals(o)) return false;

        MapKey mapKey = (MapKey) o;
        if (day != mapKey.day) {
            return false;
        }
        return time == mapKey.time;
    }

    @Override
    public int hashCode() {
        int result = 0;
        result = 31 * result + (int) (day ^ (day >>> 32));
        result = 31 * result + (int) (time ^ (time >>> 32));
        return result;
    }

    public MapKey() {
    }

    public MapKey(long day, long time) {
        this.day = day;
        this.time = time;
    }

}