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 = "BankAccount_M")
public class BankAccount extends BaseMaster {

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

	@Column(name = "KdBankAccount", length = 80)
	private Integer kdBankAccount;

	@Column(name = "BankAccountNama", length = 100)
	private String bankAccountNama;

	@Column(name = "BankAccountKantor", length = 30)
	private String bankAccountKantor;

	@Column(name = "BankAccountNomor", length = 80)
	private String bankAccountNomor;

	@Column(name = "KeteranganLainnya", length = 150)
	private String keteranganLainnya;

	@Column(name = "QBankAccount")
	private short qBankAccount;

	@ManyToOne
	@JoinColumn(name = "NoCmFk")
	private Pasien noCm;

	@Column(name = "NoCmFk", insertable = false, updatable = false)
	private Integer noCmId;

	@ManyToOne
	@JoinColumn(name = "KdRekananFk")
	private Rekanan kdRekanan;

	@Column(name = "KdRekananFk", insertable = false, updatable = false)
	private Integer kdRekananId;

	@ManyToOne
	@JoinColumn(name = "KdPegawaiFk")
	private Pegawai kdPegawai;

	@Column(name = "KdPegawaiFk", insertable = false, updatable = false)
	private Integer kdPegawaiId;

	@ManyToOne
	@JoinColumn(name = "KdCaraBayarFk")
	private CaraBayar kdCaraBayar;

	@Column(name = "KdCaraBayarFk", insertable = false, updatable = false)
	private Integer kdCaraBayarId;

	@ManyToOne
	@JoinColumn(name = "KdAccountFk")
	private ChartOfAccount kdAccount;

	@Column(name = "KdAccountFk", insertable = false, updatable = false)
	private Integer kdAccountId;

}
