package com.example.projectback.model;

import javax.persistence.Embeddable;
import java.io.Serializable;
import java.util.Objects;

public class SubjectStudentId implements Serializable {
    private Long subject;
    private Long student;

    public Long getSubject() {
        return subject;
    }

    public void setSubject(Long subject) {
        this.subject = subject;
    }

    public Long getStudent() {
        return student;
    }

    public void setStudent(Long student) {
        this.student = student;
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(subject, student);
    }
}
