package com.rit.ems.model;

import com.rit.ems.util.JsonConverter;
import jakarta.persistence.*;
import java.util.List;

@Entity
@Table(name = "ems_classes")
public class ClassMapping {
    @Id
    private Long id;

    private String institution;
    private String department;
    
    @Column(name = "academic_year")
    private String academicYear;

    @Convert(converter = JsonConverter.class)
    @Column(columnDefinition = "TEXT")
    private List<String> sections;

    private String status;

    public ClassMapping() {}

    public ClassMapping(Long id, String institution, String department, String academicYear, List<String> sections, String status) {
        this.id = id;
        this.institution = institution;
        this.department = department;
        this.academicYear = academicYear;
        this.sections = sections;
        this.status = status;
    }

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

    public String getInstitution() { return institution; }
    public void setInstitution(String institution) { this.institution = institution; }

    public String getDepartment() { return department; }
    public void setDepartment(String department) { this.department = department; }

    public String getAcademicYear() { return academicYear; }
    public void setAcademicYear(String academicYear) { this.academicYear = academicYear; }

    public List<String> getSections() { return sections; }
    public void setSections(List<String> sections) { this.sections = sections; }

    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }
}
