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;

@Getter
@Setter
@Entity
@Table(name = "KelompokTransaksi_M")
public class KelompokTransaksi extends BaseMaster {

	@Column(name = "isCostInOut")
	@Caption(value = "Is Cost In Out")
	private Byte isCostInOut;

	@NotNull(message = "Kd Kelompok Transaksi tidak boleh kosong")
	@Column(name = "KdKelompokTransaksi", nullable = false)
	@Caption(value = "Kode Kelompok Transaksi")
	private Byte kdKelompokTransaksi;

	@NotNull(message = "Kelompok Transaksi tidak boleh kosong")
	@Column(name = "KelompokTransaksi", nullable = false, length = 50)
	@Caption(value = "Kelompok Transaksi")
	private String kelompokTransaksi;

	@NotNull(message = "QKelompok Transaksi tidak boleh kosong")
	@Column(name = "QKelompokTransaksi", nullable = false)
	@Caption(value = "QKelompok Transaksi")
	private Byte qKelompokTransaksi;

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

}