package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "Awards_M")
public class Awards extends BaseMaster{
	@Column(name = "kdAwards", nullable = false)
	@Caption(value = "kdAwards")
	private Byte kdAwards;
	
	@Column(name = "namaAwards", nullable = false)
	@Caption(value = "namaAwards")
	private String namaAwards;
	
	@ManyToOne
	@JoinColumn(name = "awardsHeadFk")
	@Caption(value="awardsHeadFk")
	private Awards awardsHead;

	@Column(name = "awardsHeadFk", insertable=false,updatable=false,nullable=true)
	private Integer awardsHeadId;

	@ManyToOne
	@JoinColumn(name = "asalAwardsFk")
	@Caption(value="asalAwardsFk")
	private Asal asalAwards;

	@Column(name = "asalAwardsFk", insertable=false,updatable=false,nullable=false)
	private Integer asalAwardsId;

	@ManyToOne
	@JoinColumn(name = "departemenFk")
	@Caption(value="departemenFk")
	private Departemen departemen;

	@Column(name = "departemenFk", insertable=false,updatable=false,nullable=false)
	private Integer departemenId;

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

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}
