package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseMaster;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

import static javax.persistence.GenerationType.SEQUENCE;

@Getter
@Setter
@Entity
@Table(name = "MapKebutuhanSaranaToKamar_M")
public class MapKebutuhanSaranaToKamar extends BaseMaster {

	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "public.mapkebutuhansaranatokamar_m_id_seq")
	@SequenceGenerator(name = "public.mapkebutuhansaranatokamar_m_id_seq", sequenceName = "public.mapkebutuhansaranatokamar_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	@ManyToOne
	@JoinColumn(name = "ObjectKamarFk")
	private Kamar kamar;

	@Column(name = "ObjectKamarFk", insertable = false, updatable = false, nullable = false)
	private Integer kamarId;

	@Column(name = "jumlah")
	private Integer jumlah;

	@Column(name = "satuan", length = 50)
	private String satuan;

	@Column(name = "harga")
	private Double harga;

}
