package com.davos.assessment.project;

import com.davos.assessment.assessment.Assessment;
import jakarta.persistence.*;

@Entity
@Table(name = "project_assessments")
public class ProjectAssessment {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @ManyToOne(fetch = FetchType.LAZY, optional = false)
  @JoinColumn(name = "project_id", nullable = false)
  private Project project;

  @ManyToOne(fetch = FetchType.LAZY, optional = false)
  @JoinColumn(name = "assessment_id", nullable = false)
  private Assessment assessment;

  @Column(nullable = false)
  private boolean active = true;

  public Long getId() { return id; }
  public Project getProject() { return project; }
  public void setProject(Project project) { this.project = project; }
  public Assessment getAssessment() { return assessment; }
  public void setAssessment(Assessment assessment) { this.assessment = assessment; }
  public boolean isActive() { return active; }
  public void setActive(boolean active) { this.active = active; }
}
