package com.magistr.app.model;

import jakarta.persistence.*;

@Entity
@Table(name = "student_groups")
public class StudentGroup extends LifecycleEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false, length = 100)
    private String name;

    @Column(name = "group_size", nullable = false)
    private Long groupSize;

    @ManyToOne(optional = false)
    @JoinColumn(name = "education_form_id", nullable = false)
    private EducationForm educationForm;

    @Column(name = "department_id", nullable = false)
    private Long departmentId;

    @ManyToOne(optional = false)
    @JoinColumn(name = "specialty_id", nullable = false)
    private Speciality speciality;

    @ManyToOne(optional = false)
    @JoinColumn(name = "specialty_profile_id", nullable = false)
    private SpecialtyProfile specialtyProfile;

    @Column(name="year_start_study", nullable = false)
    private Integer yearStartStudy;

    public StudentGroup() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getGroupSize() {
        return groupSize;
    }

    public void setGroupSize(Long groupSize) {
        this.groupSize = groupSize;
    }

    public EducationForm getEducationForm() {
        return educationForm;
    }

    public void setEducationForm(EducationForm educationForm) {
        this.educationForm = educationForm;
    }

    public Long getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Long departmentId) {
        this.departmentId = departmentId;
    }

    public Speciality getSpeciality() {
        return speciality;
    }

    public void setSpeciality(Speciality speciality) {
        this.speciality = speciality;
    }

    public SpecialtyProfile getSpecialtyProfile() {
        return specialtyProfile;
    }

    public void setSpecialtyProfile(SpecialtyProfile specialtyProfile) {
        this.specialtyProfile = specialtyProfile;
    }

    public Integer getYearStartStudy() {
        return yearStartStudy;
    }

    public void setYearStartStudy(Integer yearStartStudy) {
        this.yearStartStudy = yearStartStudy;
    }
}
