package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

import static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "JenisKonsumsiSet_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class JenisKonsumsiSet extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectStrukOrderFk")
	private StrukOrder strukOrder;

	@Column(name = "ObjectStrukOrderFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String strukOrderId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectJenisKonsumsiFk")
	private JenisKonsumsi jenisKonsumsi;

	@Column(name = "ObjectJenisKonsumsiFk", insertable = false, updatable = false, nullable = false)
	private Integer jenisKonsumsiId;

	@Column(name = "isNilai")
	@Caption(value = "Is Nilai")
	private Boolean isNilai;

}
