package com.rit.ems.model;

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

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

    private String name;

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

    public Batch() {}

    public Batch(Long id, String name, List<Object> classes) {
        this.id = id;
        this.name = name;
        this.classes = classes;
    }

    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 List<Object> getClasses() { return classes; }
    public void setClasses(List<Object> classes) { this.classes = classes; }
}
