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 MataUang
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "MataUang_M")
public class MataUang extends BaseMaster {

	@NotNull(message = "Current Kurs To I D R tidak boleh kosong")
	@Column(name = "CurrentKursToIDR", nullable = false)
	@Caption(value = "Current Kurs To I D R")
	private Double currentKursToIDR;

	@NotNull(message = "Kd Mata Uang tidak boleh kosong")
	@Column(name = "KdMataUang", nullable = false)
	@Caption(value = "Kode Mata Uang")
	private Byte kdMataUang;

	@NotNull(message = "Mata Uang tidak boleh kosong")
	@Column(name = "MataUang", nullable = false, length = 50)
	@Caption(value = "Mata Uang")
	private String mataUang;

	@NotNull(message = "QMata Uang tidak boleh kosong")
	@Column(name = "QMataUang", nullable = false)
	@Caption(value = "QMata Uang")
	private Byte qMataUang;

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

}