package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity // @Audited
@Table(name = "SkoringDetail_M")
public class SkoringDetail extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectSkoringFk")
	@NotNull(message = "Kd Skoring tidak boleh kosong")
	@Caption(value = "Object Skoring")
	private Skoring skoring;

	@Column(name = "Score", nullable = false, length = 100)
	@Caption(value = "Score")
	private Integer score;

	@Column(name = "Deskripsi", nullable = false, length = 100)
	@Caption(value = "Deskripsi")
	private String deskripsi;

	public Skoring getSkoring() {
		return skoring;
	}

	public void setSkoring(Skoring skoring) {
		this.skoring = skoring;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	public String getDeskripsi() {
		return deskripsi;
	}

	public void setDeskripsi(String deskripsi) {
		this.deskripsi = deskripsi;
	}

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

	public Integer getId() {

		return id;
	}

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