package com.rit.ems.model;

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

@Entity
@Table(name = "ems_settings")
public class Setting {
    @Id
    private String id; // key

    @Convert(converter = JsonConverter.class)
    @Column(name = "setting_value", columnDefinition = "TEXT")
    private Object value;

    public Setting() {}

    public Setting(String id, Object value) {
        this.id = id;
        this.value = value;
    }

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

    public Object getValue() { return value; }
    public void setValue(Object value) { this.value = value; }
}
