package io.delphiplatform.api.v3.rdb.entity.video;

import java.io.Serializable;
import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.Embeddable;

import lombok.Getter;
import lombok.Setter;

@Embeddable
@Getter
@Setter
public class TrendingVideoChartSummaryReportId implements Serializable {

    private static final long serialVersionUID = 1975632327438947965L;

    @Column(name = "video_id")
    private String videoId;
    @Column(name = "chart_id")
    private String chartId;

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

    @Override
    public int hashCode() {
        return Objects.hash(videoId, chartId);
    }
}
