package com.jasamedika.medifirst2000.entities.constant;

import lombok.Getter;

/**
 * @author Salman
 * @version 1.0.0
 * @since 05/08/2024
 */
public enum KelompokRuangan {
	REGULER(1, "Reguler"), EKSEKUTIF(2, "Eksekutif");

	private final long id;

	@Getter
	private final String name;

	KelompokRuangan(long id, String name) {
		this.id = id;
		this.name = name;
	}

	public long id() {
		return this.id;
	}

	@Override
	public String toString() {
		return Long.toString(id);
	}

	public static KelompokRuangan valueOf(long id) {
		for (KelompokRuangan kelompokRuangan : values()) {
			if (kelompokRuangan.id == id) {
				return kelompokRuangan;
			}
		}
		throw new IllegalArgumentException("No matching constant for [" + id + "]");
	}
}
