package com.jasamedika.medifirst2000.entities;

import javax.persistence.*;

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

import static javax.persistence.GenerationType.SEQUENCE;

@Getter
@Setter
@Entity
@Table(name = "EkstensionNoTelepon_M")
public class EkstensionNoTelepon extends BaseMaster {

	@Column(name = "CounterNumber", length = 200)
	@Caption(value = "Counter Number")
	private Integer counterNumber;

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Ruangan")
	private Ruangan ruangan;

	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false)
	private Integer ruanganId;

	@Column(name = "NoEkstension", length = 200)
	@Caption(value = "No Ekstension")
	private String noEkstension;

	@ManyToOne
	@JoinColumn(name = "ObjectStatusSemuaRuanganFk")
	@Caption(value = "statusSemuaRuangan")
	private StatusYaTidak statusSemuaRuangan;

	@Column(name = "ObjectStatusSemuaRuanganFk", insertable = false, updatable = false)
	private Integer statusSemuaRuanganId;

	@ManyToOne
	@JoinColumn(name = "ObjectStatusPelangganFk")
	@Caption(value = "statusPelanggan")
	private StatusYaTidak statusPelanggan;

	@Column(name = "ObjectStatusPelangganFk", insertable = false, updatable = false)
	private Integer statusPelangganId;

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

}