package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class MetodePenyusutan
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "MetodePenyusutan_M")
public class MetodePenyusutan extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message = "Object Departemen Harus Diisi")
	@Caption(value = "Object Departemen")
	private Departemen departemen;

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

	@Caption(value = "Kode Metode Penyusutan")
	private Byte kdMetodePenyusutan;

	@Caption(value = "Metode Penyusutan")
	private String metodePenyusutan;

	@Caption(value = "Persen Penyusutan")
	private Double persenPenyusutan;

	@Caption(value = "QMetode Penyusutan")
	private Byte qMetodePenyusutan;

	@Caption(value = "Rumus Penyusutan")
	private String rumusPenyusutan;

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

}